Sha256: 15063fd834736d094104f645b4c7b0559ecfaa8eed7345b80c169269df98a7f1

Contents?: true

Size: 452 Bytes

Versions: 5

Compression:

Stored size: 452 Bytes

Contents

# frozen_string_literal: true

module Rack
  class SimpleUserAgent
    class Railtie < ::Rails::Railtie
      initializer 'rack-simple_user_agent.configure_rails_initialization' do |app|
        app.config.middleware.use Rack::SimpleUserAgent

        ActiveSupport.on_load(:action_controller) do
          ActionDispatch::Request.class_eval do
            include Rack::SimpleUserAgent::Detectors
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rack-simple_user_agent-1.1.1 lib/rack/simple_user_agent/railtie.rb
rack-simple_user_agent-1.1.0 lib/rack/simple_user_agent/railtie.rb
rack-simple_user_agent-1.0.0 lib/rack/simple_user_agent/railtie.rb
rack-simple_user_agent-0.6.0 lib/rack/simple_user_agent/railtie.rb
rack-simple_user_agent-0.5.0 lib/rack/simple_user_agent/railtie.rb