Sha256: 64fd59d3a1777cf0ec0c9390b118366840d31f6c30cf59fc8945fafd661e71bb
Contents?: true
Size: 690 Bytes
Versions: 78
Compression:
Stored size: 690 Bytes
Contents
module RailsHelper def with_railtie(app) clear_rails_error_reporter! if Rails.respond_to? :error Appsignal::Integrations::Railtie.initialize_appsignal(app) yield ensure clear_rails_error_reporter! end def with_rails_error_reporter if Rails.respond_to? :error clear_rails_error_reporter! Appsignal::Integrations::Railtie.initialize_error_reporter end yield ensure clear_rails_error_reporter! end def clear_rails_error_reporter! return unless Rails.respond_to? :error Rails .error .instance_variable_get(:@subscribers) .reject! { |s| s == Appsignal::Integrations::RailsErrorReporterSubscriber } end end
Version data entries
78 entries across 78 versions & 1 rubygems