Class: ApplicationController

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

Overview

Main Controller from the application

Instance Method Summary collapse

Instance Method Details

#default_url_optionsObject


10
11
12
# File 'app/controllers/application_controller.rb', line 10

def default_url_options
  { locale: I18n.locale }
end

#set_localeObject


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

def set_locale
  I18n.locale = params[:locale] || I18n.default_locale
end