aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorMike Gunderloy <MikeG1@larkfarm.com>2008-10-06 07:53:09 -0500
committerMike Gunderloy <MikeG1@larkfarm.com>2008-10-06 07:53:09 -0500
commit7a920bca4df1809e6e4583df54b3580f8ed05ab7 (patch)
treec755fb332490c710bc1bae73c5abb1380bf73109 /activerecord
parenta21d8f632fe8aa3bf4c1b83accc7a2dd230c28e7 (diff)
downloadrails-7a920bca4df1809e6e4583df54b3580f8ed05ab7.tar.gz
rails-7a920bca4df1809e6e4583df54b3580f8ed05ab7.tar.bz2
rails-7a920bca4df1809e6e4583df54b3580f8ed05ab7.zip
Clarify that the event sequence shown in the comments applies to new records only.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/callbacks.rb5
1 files changed, 3 insertions, 2 deletions
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 <tt>Base#save</tt> call:
+ # the <tt>Base#save</tt> call for a new record:
#
# * (-) <tt>save</tt>
# * (-) <tt>valid</tt>
@@ -22,7 +22,8 @@ module ActiveRecord
# * (8) <tt>after_save</tt>
#
# 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 <tt>Base#save</tt> an existing record is similar, except that each
+ # <tt>_on_create</tt> callback is replaced by the corresponding <tt>_on_update</tt> callback.
#
# Examples:
# class CreditCard < ActiveRecord::Base