Sha256: 24be124ddfd2d5697f4412d90135dc770a4abb1b50639354e13f6fd1fa0a5e80

Contents?: true

Size: 413 Bytes

Versions: 6

Compression:

Stored size: 413 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  module Explainer
    class Railtie < ::Rails::Railtie # :nodoc:
      config.after_initialize do
        ActiveSupport.on_load :active_record do
          require_relative 'subscriber'

          ActiveRecord::Explainer.config.logger = Rails.logger
          ActiveRecord::Explainer::Subscriber.attach_to :active_record
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activerecord-explainer-0.2.4 lib/activerecord/explainer/railtie.rb
activerecord-explainer-0.2.3 lib/activerecord/explainer/railtie.rb
activerecord-explainer-0.2.2 lib/activerecord/explainer/railtie.rb
activerecord-explainer-0.2.1 lib/activerecord/explainer/railtie.rb
activerecord-explainer-0.2.0 lib/activerecord/explainer/railtie.rb
activerecord-explainer-0.1.0 lib/activerecord/explainer/railtie.rb