aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-06-10 08:50:51 -0700
committerGitHub <noreply@github.com>2016-06-10 08:50:51 -0700
commitcb4d18d31aeeca4bce6377246f8e0f6c35054717 (patch)
tree7c4767f674060db5e19b0de4f796d0cfbb30e074 /activesupport
parent527200a456f50428984671f6ca41cb9e82077cb7 (diff)
parent3da701dd3c76abbb9013e71daf26a0eee8dfa744 (diff)
downloadrails-cb4d18d31aeeca4bce6377246f8e0f6c35054717.tar.gz
rails-cb4d18d31aeeca4bce6377246f8e0f6c35054717.tar.bz2
rails-cb4d18d31aeeca4bce6377246f8e0f6c35054717.zip
Merge pull request #25342 from Edouard-chin/callbacks-wrong-method-name
[ci skip] `define_model_callbacks` only exist in active model
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/callbacks.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index 904d3f0eb0..1559fe641c 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -736,8 +736,13 @@ module ActiveSupport
#
# would call <tt>Audit#save</tt>.
#
- # NOTE: +method_name+ passed to `define_model_callbacks` must not end with
+ # ===== Notes
+ #
+ # +names+ passed to `define_callbacks` must not end with
# `!`, `?` or `=`.
+ #
+ # Calling `define_callbacks` multiple times with the same +names+ will
+ # overwrite previous callbacks registered with `set_callback`.
def define_callbacks(*names)
options = names.extract_options!