class method
self.add_event_subscriber
Ruby on Rails 5.2.8.1
Since v4.1.16 PrivateSignature
self.add_event_subscriber(event)
No documentation comment.
Parameters
-
eventreq
Source
# File activesupport/lib/active_support/subscriber.rb, line 65
def add_event_subscriber(event) # :doc:
return if %w{ start finish }.include?(event.to_s)
pattern = "#{event}.#{namespace}"
# Don't add multiple subscribers (eg. if methods are redefined).
return if subscriber.patterns.include?(pattern)
subscriber.patterns << pattern
notifier.subscribe(pattern, subscriber)
end
Defined in activesupport/lib/active_support/subscriber.rb line 65
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Subscriber