Sha256: d0b87cfc4b2684e1ac0b0d26adac5e5dfa974f3ee42af0b3e7401ebca0c06dee
Contents?: true
Size: 423 Bytes
Versions: 8
Compression:
Stored size: 423 Bytes
Contents
module Trestle module Auth module Controller module Locale extend ActiveSupport::Concern included do around_action :set_locale, if: :logged_in? if Trestle.config.auth.locale end protected def set_locale I18n.with_locale(instance_exec(current_user, &Trestle.config.auth.locale) || I18n.default_locale) { yield } end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems