diff options
author | zvkemp <zvkemp@gmail.com> | 2019-02-07 11:58:50 -0800 |
---|---|---|
committer | zvkemp <zvkemp@gmail.com> | 2019-02-11 16:04:25 -0800 |
commit | 94f8e8c8f73b7034a9cc3e7f6bf040350aa9701f (patch) | |
tree | 3485dfb7b565555445cd44865f9074dfef233b6d /activesupport/lib/active_support/notifications.rb | |
parent | b67d5c6dedbf033515a96a95d24d085bf99a0d07 (diff) | |
download | rails-94f8e8c8f73b7034a9cc3e7f6bf040350aa9701f.tar.gz rails-94f8e8c8f73b7034a9cc3e7f6bf040350aa9701f.tar.bz2 rails-94f8e8c8f73b7034a9cc3e7f6bf040350aa9701f.zip |
use a proxy matcher for AS::N fanout
Diffstat (limited to 'activesupport/lib/active_support/notifications.rb')
-rw-r--r-- | activesupport/lib/active_support/notifications.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/notifications.rb b/activesupport/lib/active_support/notifications.rb index 7ccc333463..d9e93b530c 100644 --- a/activesupport/lib/active_support/notifications.rb +++ b/activesupport/lib/active_support/notifications.rb @@ -153,6 +153,15 @@ module ActiveSupport # # ActiveSupport::Notifications.unsubscribe("render") # + # Subscribers using a regexp or other pattern-matching object will remain subscribed + # to all events that match their original pattern, unless those events match a string + # passed to `unsubscribe`: + # + # subscriber = ActiveSupport::Notifications.subscribe(/render/) { } + # ActiveSupport::Notifications.unsubscribe('render_template.action_view') + # subscriber.matches?('render_template.action_view') # => false + # subscriber.matches?('render_partial.action_view') # => true + # # == Default Queue # # Notifications ships with a queue implementation that consumes and publishes events |