Sha256: d73fc65277595c7f32f110e9d197651cd9bb1c16cedbe32750eec70f3bba8353
Contents?: true
Size: 559 Bytes
Versions: 20
Compression:
Stored size: 559 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 main_app.new_user_session_path 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
20 entries across 20 versions & 1 rubygems