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

add notes for define_model_callbacks [ci skip]

This commit is contained in:
Kuldeep Aggarwal 2014-10-03 23:04:01 +05:30
parent 23ef52514e
commit f50430ee3e
2 changed files with 6 additions and 0 deletions

View file

@ -97,6 +97,9 @@ module ActiveModel
# # obj is the MyModel instance that the callback is being called on
# end
# end
#
# NOTE: +method_name+ passed to `define_model_callbacks` must not end with
# `!`, `?` and `=`.
def define_model_callbacks(*callbacks)
options = callbacks.extract_options!
options = {

View file

@ -719,6 +719,9 @@ module ActiveSupport
# define_callbacks :save, scope: [:name]
#
# would call <tt>Audit#save</tt>.
#
# NOTE: +method_name+ passed to `define_model_callbacks` must not end with
# `!`, `?` and `=`.
def define_callbacks(*names)
options = names.extract_options!