diff --git a/activemodel/lib/active_model/callbacks.rb b/activemodel/lib/active_model/callbacks.rb index b27a39b787..467028f9e8 100644 --- a/activemodel/lib/active_model/callbacks.rb +++ b/activemodel/lib/active_model/callbacks.rb @@ -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 = { diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 0c8c1d7dfb..21a2f54bc1 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -719,6 +719,9 @@ module ActiveSupport # define_callbacks :save, scope: [:name] # # would call Audit#save. + # + # NOTE: +method_name+ passed to `define_model_callbacks` must not end with + # `!`, `?` and `=`. def define_callbacks(*names) options = names.extract_options!