instance method
disable
Ruby on Rails 8.0.4
Since v7.1.6Signature
disable(subscriber)
Prevent a subscriber from being notified of errors for the duration of the block. You may pass in the subscriber itself, or its class.
This can be helpful for error reporting service integrations, when they wish to handle any errors higher in the stack.
Parameters
-
subscriberreq
Source
# File activesupport/lib/active_support/error_reporter.rb, line 185
def disable(subscriber)
disabled_subscribers = (ActiveSupport::IsolatedExecutionState[self] ||= [])
disabled_subscribers << subscriber
begin
yield
ensure
disabled_subscribers.delete(subscriber)
end
end
Defined in activesupport/lib/active_support/error_reporter.rb line 185
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::ErrorReporter