-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Trivial - P5
-
Affects Version/s: None
-
Component/s: Attributes
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Since Rails 5.1 there are additional methods to use in callback to track attribute changes, including 'saved_change_to_attribute' and 'attribute_before_last_save'. See this PR for details.
Since Mongoid strives to maintain compatibility with ActiveRecord whenever possible, these method should be implemented.
Original description
attribute_changed? and attribute_was ActiveRecord methods will be deprecated inside of after_(create|update|save) callbacks source
Does Mongoid support mettods saved_change_to_attribute? and attribute_before_last_save to maintain consistency ?
Additionally support will_save_change_to_attribute.
- is duplicated by
-
MONGOID-4783 saved_change_to_attribute? for Rails 6
-
- Closed
-