mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[ci skip] Update ActiveSupport::Subscriber documentation
This commit is contained in:
parent
89e051ace3
commit
4c945cccb5
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ module ActiveSupport
|
|||
# ActiveSupport::Notifications. The subscriber dispatches notifications to
|
||||
# a registered object based on its given namespace.
|
||||
#
|
||||
# An example would be Active Record subscriber responsible for collecting
|
||||
# An example would be an Active Record subscriber responsible for collecting
|
||||
# statistics about queries:
|
||||
#
|
||||
# module ActiveRecord
|
||||
|
@ -66,7 +66,7 @@ module ActiveSupport
|
|||
|
||||
pattern = "#{event}.#{namespace}"
|
||||
|
||||
# don't add multiple subscribers (eg. if methods are redefined)
|
||||
# Don't add multiple subscribers (eg. if methods are redefined).
|
||||
return if subscriber.patterns.include?(pattern)
|
||||
|
||||
subscriber.patterns << pattern
|
||||
|
|
Loading…
Reference in a new issue