1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Document that after_create can take a block.

This commit is contained in:
Ryan Bigg 2009-07-16 07:48:54 +10:00
parent 65ab56bb18
commit bb8fb2d143

View file

@ -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