class method
self.add_event_subscriber
Ruby on Rails 8.0.4
Since v4.1.16 PrivateSignature
self.add_event_subscriber(event)
No documentation comment.
Parameters
-
eventreq
Source
# File activesupport/lib/active_support/subscriber.rb, line 86
def add_event_subscriber(event) # :doc:
return if invalid_event?(event)
pattern = prepare_pattern(event)
# Don't add multiple subscribers (e.g. if methods are redefined).
return if pattern_subscribed?(pattern)
subscriber.patterns[pattern] = notifier.subscribe(pattern, subscriber)
end
Defined in activesupport/lib/active_support/subscriber.rb line 86
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Subscriber