diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/callbacks.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 01e41c04df..97bb7f664d 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -262,6 +262,10 @@ module ActiveRecord # Is called _after_ <tt>Base.save</tt> on new objects that haven't been saved yet (no record exists). # Note that this callback is still wrapped in the transaction around +save+. For example, if you # invoke an external indexer at this point it won't see the changes in the database. + # + # class Contact < ActiveRecord::Base + # after_create { |record| logger.info( "Contact #{record.id} was created." ) } + # end def after_create() end def create_with_callbacks #:nodoc: return false if callback(:before_create) == false |