Sha256: f8b0bf9cef83890574243064e478a0c892ca5a6315c67d2f0df308201851e7f0

Contents?: true

Size: 356 Bytes

Versions: 12

Compression:

Stored size: 356 Bytes

Contents

require "action_controller/railtie"

class Browser
  module ActionController
    extend ActiveSupport::Concern

    included do
      helper_method :browser
    end

    private

    def browser
      @browser ||= Browser.new(
        accept_language: request.headers["Accept-Language"],
        ua: request.headers["User-Agent"]
      )
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
browser-1.1.0 lib/browser/action_controller.rb
browser2-1.0.0 lib/browser/action_controller.rb
browser-1.0.1 lib/browser/action_controller.rb
browser-1.0.0 lib/browser/action_controller.rb
browser-0.9.1 lib/browser/action_controller.rb
browser-0.9.0 lib/browser/action_controller.rb
browser-0.8.0 lib/browser/action_controller.rb
browser-0.7.2 lib/browser/action_controller.rb
browser-0.7.1 lib/browser/action_controller.rb
browser-0.7.0 lib/browser/action_controller.rb
browser-0.6.0 lib/browser/action_controller.rb
browser-0.5.0 lib/browser/action_controller.rb