aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorpaulccarey <paulccarey@gmail.com>2010-07-29 15:34:59 +0100
committerpaulccarey <paulccarey@gmail.com>2010-07-29 15:34:59 +0100
commit2b2ee222f3012a29c9db95d357a30029100b226b (patch)
tree6359b3994e1b4d77311c2fa039e0a7e9397357c8 /activemodel/lib/active_model
parentc178a26ec784f34e82f08e26064d9798edb09e72 (diff)
parent873c5a9e5924a7776692b9a17b03d0becec6e513 (diff)
downloadrails-2b2ee222f3012a29c9db95d357a30029100b226b.tar.gz
rails-2b2ee222f3012a29c9db95d357a30029100b226b.tar.bz2
rails-2b2ee222f3012a29c9db95d357a30029100b226b.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/dirty.rb5
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']