diff options
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/dirty.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb index 4c80863e3a..5ea7636427 100644 --- a/activemodel/lib/active_model/dirty.rb +++ b/activemodel/lib/active_model/dirty.rb @@ -83,7 +83,10 @@ module ActiveModel # person.name_changed? # => false # person.name # => 'Bill' # - # Before modifying an attribute in-place: + # If an attribute is modified in-place then make use of <tt>[attribute_name]_will_change!</tt> + # to mark that the attribute is changing. Otherwise ActiveModel can't track changes to + # in-place attributes. + # # person.name_will_change! # person.name << 'y' # person.name_change # => ['Bill', 'Billy'] |