提交 d7f0e434 编写于 作者: A andrea longhi

add around_create callback documentation for ActiveModel::Callbacks

上级 694c2273
......@@ -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.
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册