aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishnu Atrai <vishnu.atrai@gmail.com>2011-08-05 14:48:00 +0530
committerXavier Noria <fxn@hashref.com>2011-08-13 16:22:32 -0700
commitd5adaf2d38f81429e21d9670b6a852668edb3757 (patch)
tree0ed43aeab52b44fbb62e0d8ffc1632b82f2bd051
parent33d7a6bc55a983ea690961d3a434096fe80d0fca (diff)
downloadrails-d5adaf2d38f81429e21d9670b6a852668edb3757.tar.gz
rails-d5adaf2d38f81429e21d9670b6a852668edb3757.tar.bz2
rails-d5adaf2d38f81429e21d9670b6a852668edb3757.zip
ActiveModel::Callbacks basic guide
-rw-r--r--railties/guides/source/active_model_basics.textile8
1 files changed, 2 insertions, 6 deletions
diff --git a/railties/guides/source/active_model_basics.textile b/railties/guides/source/active_model_basics.textile
index e4c84365d3..92fa5bc8f4 100644
--- a/railties/guides/source/active_model_basics.textile
+++ b/railties/guides/source/active_model_basics.textile
@@ -57,18 +57,14 @@ class Person
def update
_run_update_callbacks do
- puts 'saving...'
+ # This will call when we are trying to call update on object.
end
end
def reset_me
- puts 'before saving...'
+ # This method will call when you are calling update on object as a before_update callback as defined.
end
end
-
-person = Person.new
-person.update # before saving...
- # saving...
</ruby>
h3. Changelog