diff options
author | Xavier Noria <fxn@hashref.com> | 2010-05-02 00:47:09 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-05-02 00:47:09 +0200 |
commit | 1b898cc946f69808d5fa0db922ba100fb8ffcfe3 (patch) | |
tree | 605fe97fa2ad3ba491d2d7a08a1c75a0bb81af13 /activerecord/lib | |
parent | 6433c939c1314ddf92c9986bb8664e568ca22d11 (diff) | |
download | rails-1b898cc946f69808d5fa0db922ba100fb8ffcfe3.tar.gz rails-1b898cc946f69808d5fa0db922ba100fb8ffcfe3.tar.bz2 rails-1b898cc946f69808d5fa0db922ba100fb8ffcfe3.zip |
say something about after_(commit|rollback) in callbacks.rb, the fact that their implementation is elsewhere is not important for rdoc purposes
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/callbacks.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 98c14e6eb0..7ebeb6079e 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -17,8 +17,13 @@ module ActiveRecord # * (-) <tt>create</tt> # * (5) <tt>after_create</tt> # * (6) <tt>after_save</tt> + # * (7) <tt>after_commit</tt> # - # That's a total of eight callbacks, which gives you immense power to react and prepare for each state in the + # Also, an <tt>after_rollback</tt> callback can be configured to be triggered whenever a rollback is issued. + # Check out <tt>ActiveRecord::Transactions</tt> for more details about <tt>after_commit</tt> and + # <tt>after_rollback</tt>. + # + # That's a total of ten callbacks, which gives you immense power to react and prepare for each state in the # Active Record lifecycle. The sequence for calling <tt>Base#save</tt> for an existing record is similar, except that each # <tt>_on_create</tt> callback is replaced by the corresponding <tt>_on_update</tt> callback. # |