Sha256: 7792ebe9cea91f120f06bf3972ee4b7d5f18d00fe7d3bccad947df48a31ee5fa
Contents?: true
Size: 541 Bytes
Versions: 4
Compression:
Stored size: 541 Bytes
Contents
module KepplerFrontend class ApplicationController < App::AppController protect_from_forgery with: :exception before_action :user_signed_in? before_action :set_admin_locale def user_signed_in? return if current_user redirect_to '/alert/403' end def only_development redirect_to '/admin' if Rails.env.eql?('production') end def set_admin_locale if controller_path.include?('admin') I18n.locale = Appearance.first.language || I18n.default_locale end end end end
Version data entries
4 entries across 4 versions & 1 rubygems