Sha256: e031a70f1d3b988987ea3451148f45b4b8226f9d116d66b764a7c0adec364a24

Contents?: true

Size: 673 Bytes

Versions: 14

Compression:

Stored size: 673 Bytes

Contents

# frozen_string_literal: true

require "rails/railtie"
require_relative "action_controller"
require_relative "middleware/context/additions"

module Browser
  class Railtie < Rails::Railtie
    config.browser = ActiveSupport::OrderedOptions.new

    initializer "browser" do
      ActiveSupport.on_load(:action_controller) do
        ::ActionController::Base.include(Browser::ActionController)

        ::ActionController::Metal.include(Browser::ActionController) if defined?(::ActionController::Metal) # rubocop:disable Layout/LineLength

        Browser::Middleware::Context.include(
          Browser::Middleware::Context::Additions
        )
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
browser-6.1.0 lib/browser/rails.rb
browser-6.0.0 lib/browser/rails.rb
browser-5.3.1 lib/browser/rails.rb
browser-5.3.0 lib/browser/rails.rb
browser-5.2.0 lib/browser/rails.rb
browser-5.1.0 lib/browser/rails.rb
browser-5.0.0 lib/browser/rails.rb
browser-4.2.0 lib/browser/rails.rb
browser-4.1.0 lib/browser/rails.rb
browser-4.0.0 lib/browser/rails.rb
browser-3.0.3 lib/browser/rails.rb
browser-3.0.2 lib/browser/rails.rb
browser-3.0.1 lib/browser/rails.rb
browser-3.0.0 lib/browser/rails.rb