diff options
author | Andrew Olson <anolson@gmail.com> | 2011-09-02 11:48:45 -0400 |
---|---|---|
committer | Andrew Olson <anolson@gmail.com> | 2011-09-02 11:48:45 -0400 |
commit | d20281add192e5afba66e555ce67cf73943b033b (patch) | |
tree | 9434d31b3d17d735b5afd438c1b1473a074748b7 /railties/guides/source/active_model_basics.textile | |
parent | cfd785f910fc914c576133fee263875833ba0c92 (diff) | |
download | rails-d20281add192e5afba66e555ce67cf73943b033b.tar.gz rails-d20281add192e5afba66e555ce67cf73943b033b.tar.bz2 rails-d20281add192e5afba66e555ce67cf73943b033b.zip |
Fixing guides validation errors.
Diffstat (limited to 'railties/guides/source/active_model_basics.textile')
-rw-r--r-- | railties/guides/source/active_model_basics.textile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/guides/source/active_model_basics.textile b/railties/guides/source/active_model_basics.textile index 0672669dc5..73df567579 100644 --- a/railties/guides/source/active_model_basics.textile +++ b/railties/guides/source/active_model_basics.textile @@ -163,12 +163,14 @@ person.first_name_changed? #=> true </ruby> Track what was the previous value of the attribute. + <ruby> #attr_name_was accessor person.first_name_was #=> "First Name" </ruby> Track both previous and current value of the changed attribute. Returns an array if changed else returns nil + <ruby> #attr_name_change person.first_name_change #=> ["First Name", "First Name 1"] |