class RailsLocaleDetection::LocaleDetector

Attributes

controller[R]

Public Class Methods

before(controller) click to toggle source
# File lib/rails_locale_detection/locale_detector.rb, line 22
def self.before(controller)
  new(controller).set_locale
end
new(controller = nil) click to toggle source
# File lib/rails_locale_detection/locale_detector.rb, line 10
def initialize(controller = nil)
  @controller = controller
end

Public Instance Methods

cookies() click to toggle source
# File lib/rails_locale_detection/locale_detector.rb, line 14
def cookies
  request.cookie_jar
end
locale_key() click to toggle source
# File lib/rails_locale_detection/locale_detector.rb, line 18
def locale_key
  RailsLocaleDetection.locale_key
end