Skip to content

Commit 22bc976

Browse files
committed
Tiny update to callbacks docs [ci skip]
The following was added to the `ActiveJob::Callbacks`, `ActiveModel::Callbacks` and `AbstractController:Callbacks` docs in rails#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".
1 parent 1c2529b commit 22bc976

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

actionpack/lib/abstract_controller/callbacks.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ module AbstractController
1818
# * <tt>skip_after_action</tt>
1919
# * <tt>skip_around_action</tt>
2020
# * <tt>skip_before_action</tt>
21-
#
22-
# NOTE: Calling the same callback multiple times will overwrite previous callback definitions.
23-
#
2421
module Callbacks
2522
extend ActiveSupport::Concern
2623

activejob/lib/active_job/callbacks.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ module ActiveJob
1515
# * <tt>before_perform</tt>
1616
# * <tt>around_perform</tt>
1717
# * <tt>after_perform</tt>
18-
#
19-
# NOTE: Calling the same callback multiple times will overwrite previous callback definitions.
20-
#
2118
module Callbacks
2219
extend ActiveSupport::Concern
2320
include ActiveSupport::Callbacks

activemodel/lib/active_model/callbacks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ module ActiveModel
6060
# Would only create the +after_create+ and +before_create+ callback methods in
6161
# your class.
6262
#
63-
# NOTE: Calling the same callback multiple times will overwrite previous callback definitions.
63+
# NOTE: Defining the same callback multiple times will overwrite previous callback definitions.
6464
#
6565
module Callbacks
6666
def self.extended(base) # :nodoc:

0 commit comments

Comments
 (0)