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:
parent
23ef52514e
commit
f50430ee3e
2 changed files with 6 additions and 0 deletions
|
@ -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 = {
|
||||
|
|
|
@ -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!
|
||||
|
||||
|
|
Loading…
Reference in a new issue