Class: Timber::Integrations::ActiveRecord::LogSubscriber
- Inherits:
-
Integrator
- Object
- Integrator
- Timber::Integrations::ActiveRecord::LogSubscriber
- Defined in:
- lib/timber-rails/active_record/log_subscriber.rb,
lib/timber-rails/active_record/log_subscriber/timber_log_subscriber.rb
Overview
Reponsible for uninstalling the default ‘ActiveRecord::LogSubscriber` and replacing it with the `TimberLogSubscriber`.
Defined Under Namespace
Classes: TimberLogSubscriber
Instance Method Summary collapse
Instance Method Details
#integrate! ⇒ Object
11 12 13 14 15 16 |
# File 'lib/timber-rails/active_record/log_subscriber.rb', line 11 def integrate! return true if Timber::Integrations::Rails::ActiveSupportLogSubscriber.subscribed?(:active_record, TimberLogSubscriber) Timber::Integrations::Rails::ActiveSupportLogSubscriber.unsubscribe!(:active_record, ::ActiveRecord::LogSubscriber) TimberLogSubscriber.attach_to(:active_record) end |