Sha256: 801754ed2bdd3795c4f2a90382dddb914ddd0cb712723f5d9dfed5bdca298aa9

Contents?: true

Size: 383 Bytes

Versions: 7

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true
require "action_controller/railtie"

module Browser
  module ActionController
    extend ActiveSupport::Concern

    included do
      helper_method :browser
    end

    private

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

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/browser-2.3.0/lib/browser/action_controller.rb
browser-2.3.0 lib/browser/action_controller.rb
browser-2.2.0 lib/browser/action_controller.rb
browser-2.1.0 lib/browser/action_controller.rb
browser-2.0.3 lib/browser/action_controller.rb
browser-2.0.2 lib/browser/action_controller.rb
browser-2.0.1 lib/browser/action_controller.rb