From 1b898cc946f69808d5fa0db922ba100fb8ffcfe3 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 2 May 2010 00:47:09 +0200 Subject: say something about after_(commit|rollback) in callbacks.rb, the fact that their implementation is elsewhere is not important for rdoc purposes --- activerecord/lib/active_record/callbacks.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/callbacks.rb') 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 # * (-) create # * (5) after_create # * (6) after_save + # * (7) after_commit # - # That's a total of eight callbacks, which gives you immense power to react and prepare for each state in the + # Also, an after_rollback callback can be configured to be triggered whenever a rollback is issued. + # Check out ActiveRecord::Transactions for more details about after_commit and + # after_rollback. + # + # 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 Base#save for an existing record is similar, except that each # _on_create callback is replaced by the corresponding _on_update callback. # -- cgit v1.2.3