Sha256: 01d907c2e87858fcd1dbffc90ec8e8db961d0c01343043fb1fbd95482026a23f

Contents?: true

Size: 420 Bytes

Versions: 4

Compression:

Stored size: 420 Bytes

Contents

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::Detector
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rack-simple_user_agent-0.2.0 lib/rack/simple_user_agent/railtie.rb
rack-simple_user_agent-0.1.2 lib/rack/simple_user_agent/railtie.rb
rack-simple_user_agent-0.1.1 lib/rack/simple_user_agent/railtie.rb
rack-simple_user_agent-0.1.0 lib/rack/simple_user_agent/railtie.rb