From d5adaf2d38f81429e21d9670b6a852668edb3757 Mon Sep 17 00:00:00 2001 From: Vishnu Atrai Date: Fri, 5 Aug 2011 14:48:00 +0530 Subject: ActiveModel::Callbacks basic guide --- railties/guides/source/active_model_basics.textile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'railties/guides') 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... h3. Changelog -- cgit v1.2.3