class method
self.add_event_subscriber
Ruby on Rails 4.2.9
Since v4.1.16Signature
self.add_event_subscriber(event)
No documentation comment.
Parameters
-
eventreq
Source
# File activesupport/lib/active_support/subscriber.rb, line 64
def add_event_subscriber(event)
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 64
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Subscriber