Sha256: c881c08d429e745ded6c87eeb86389085836d56e23c84610563f814ed8212e6e
Contents?: true
Size: 524 Bytes
Versions: 4
Compression:
Stored size: 524 Bytes
Contents
module RailsLocaleDetection class LocaleDetector include DetectionMethods include LocaleAccessors attr_reader :controller delegate :params, :request, :default_url_options, :user_locale, :http_accept_language, :to => :controller def initialize(controller = nil) @controller = controller end def cookies request.cookie_jar end def locale_key RailsLocaleDetection.locale_key end def self.before(controller) new(controller).set_locale end end end
Version data entries
4 entries across 4 versions & 1 rubygems