Tiny update to callbacks docs [ci skip]
The following was added to the `ActiveJob::Callbacks`, `ActiveModel::Callbacks` and `AbstractController:Callbacks` docs in #29072: > NOTE: Calling the same callback multiple times will overwrite > previous callback definitions. The comment refers to "calling" callbacks but seems to be about defining callbacks, as mentioned in the PR description. In the ActiveJob and AbstractController docs, I believe this will be misinterpreted as referring to setting callbacks, which, as far as I can tell, does not have such a restriction. In the ActiveModel docs, I believe it would be slightly clearer to replace "calling" with "defining".
This commit is contained in:
parent
1c2529b9a6
commit
22bc976576
@ -18,9 +18,6 @@ module AbstractController
|
||||
# * <tt>skip_after_action</tt>
|
||||
# * <tt>skip_around_action</tt>
|
||||
# * <tt>skip_before_action</tt>
|
||||
#
|
||||
# NOTE: Calling the same callback multiple times will overwrite previous callback definitions.
|
||||
#
|
||||
module Callbacks
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
@ -15,9 +15,6 @@ module ActiveJob
|
||||
# * <tt>before_perform</tt>
|
||||
# * <tt>around_perform</tt>
|
||||
# * <tt>after_perform</tt>
|
||||
#
|
||||
# NOTE: Calling the same callback multiple times will overwrite previous callback definitions.
|
||||
#
|
||||
module Callbacks
|
||||
extend ActiveSupport::Concern
|
||||
include ActiveSupport::Callbacks
|
||||
|
@ -60,7 +60,7 @@ module ActiveModel
|
||||
# Would only create the +after_create+ and +before_create+ callback methods in
|
||||
# your class.
|
||||
#
|
||||
# NOTE: Calling the same callback multiple times will overwrite previous callback definitions.
|
||||
# NOTE: Defining the same callback multiple times will overwrite previous callback definitions.
|
||||
#
|
||||
module Callbacks
|
||||
def self.extended(base) # :nodoc:
|
||||
|
Loading…
Reference in New Issue
Block a user