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

add around_create callback documentation for ActiveModel::Callbacks

This commit is contained in:
andrea longhi 2012-08-08 00:16:28 +02:00
parent 694c227314
commit d7f0e434dd

View file

@ -38,6 +38,17 @@ module ActiveModel
# # Your code here
# end
#
# When defining an around callback remember to yield to the block, otherwise
# it won't be executed:
#
# around_create :log_status
#
# def log_status
# puts 'going to call the block...'
# yield
# puts 'block successfully called.'
# end
#
# You can choose not to have all three callbacks by passing a hash to the
# +define_model_callbacks+ method.
#