class method
self.add_event_subscriber
Ruby on Rails 5.1.7
Since v4.1.16 Private — implementation detail, not part of the public APISignature
self.add_event_subscriber(event)
No documentation comment.
Parameters
-
eventreq
Source
# File activesupport/lib/active_support/subscriber.rb, line 63
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 63
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Subscriber