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

Version Path
keppler-2.1.18 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.17 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.16 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.15 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.14 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.13 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.12 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.11 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.10 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.9 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.8 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.7 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.6 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.5 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.4 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.3 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.2 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.1 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1.pre.p1 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb
keppler-2.1 installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/application_controller.rb