Class: ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#not_authenticatedObject


7
8
9
# File 'app/controllers/application_controller.rb', line 7

def not_authenticated
  redirect_to , alert: (t :require_login)
end

#set_localeObject


11
12
13
14
15
16
# File 'app/controllers/application_controller.rb', line 11

def set_locale
  locale = detect_locale
  if locale && I18n.available_locales.include?(locale.to_sym)
    I18n.locale = locale.to_sym
  end
end