From 7a920bca4df1809e6e4583df54b3580f8ed05ab7 Mon Sep 17 00:00:00 2001 From: Mike Gunderloy Date: Mon, 6 Oct 2008 07:53:09 -0500 Subject: Clarify that the event sequence shown in the comments applies to new records only. --- activerecord/lib/active_record/callbacks.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index dd7ae51096..42bfe34505 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -5,7 +5,7 @@ module ActiveRecord # before or after an alteration of the object state. This can be used to make sure that associated and # dependent objects are deleted when +destroy+ is called (by overwriting +before_destroy+) or to massage attributes # before they're validated (by overwriting +before_validation+). As an example of the callbacks initiated, consider - # the Base#save call: + # the Base#save call for a new record: # # * (-) save # * (-) valid @@ -22,7 +22,8 @@ module ActiveRecord # * (8) after_save # # That's a total of eight callbacks, which gives you immense power to react and prepare for each state in the - # Active Record lifecycle. + # Active Record lifecycle. The sequence for calling Base#save an existing record is similar, except that each + # _on_create callback is replaced by the corresponding _on_update callback. # # Examples: # class CreditCard < ActiveRecord::Base -- cgit v1.2.3