Sha256: 4917db32cb9b30587e61cddb775d6f1391d194c1eb43bbe80fe5bb6c23e315ef

Contents?: true

Size: 947 Bytes

Versions: 1

Compression:

Stored size: 947 Bytes

Contents

module RailsLiveDashboard
  class Engine < ::Rails::Engine
    isolate_namespace RailsLiveDashboard

    initializer 'rails_live_dashboard', after: :load_config_initializers do |_app|
      next unless RailsLiveDashboard.configuration.enabled
    end

    initializer 'rails_live_dashboard.assets.precompile' do |app|
      next unless RailsLiveDashboard.configuration.enabled

      app.config.assets.precompile += [
        'builds/rails_live_dashboard/application.js',
        'builds/rails_live_dashboard/application.css'
      ]
    end

    initializer 'rails_live_dashboard.action_controller' do
      next unless RailsLiveDashboard.configuration.enabled

      Subscribers::ActionControllerSubscriber.new
    end

    initializer 'rails_live_dashboard.action_record' do
      Subscribers::ActiveRecordSubscriber.new
    end

    initializer 'rails_live_dashboard.action_job' do
      Subscribers::ActiveJobSubscriber.new
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_live_dashboard-0.2.0 lib/rails_live_dashboard/engine.rb