-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
Update:
now both unit/mongoid/versioning_spec.rb and integration/mongoid/versioning_spec.rb should pass.
When I use
include Mongoid::Versioning
max_versions 1
in my project, I found the model keep saving old copies dicarding the existence of max_versions.
I think the problem occurs because
self.versions.shift
won't actually change the underlying object.
I wrote a patch that fix the problem and add an option to specify max_versions 0 which only update version numbers without actually saving old copies.