class ActiveSupport::ErrorReporter
def unsubscribe(subscriber)
# or
Rails.error.unsubscribe(subscriber)
Rails.error.subscribe(subscriber)
subscriber = MyErrorSubscriber.new
Unregister an error subscriber. Accepts either a subscriber or a class.
def unsubscribe(subscriber) @subscribers.delete_if { |s| subscriber === s } end