Class: Pgbus::LocaleController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Pgbus::LocaleController
- Defined in:
- app/controllers/pgbus/locale_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#update ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/controllers/pgbus/locale_controller.rb', line 5 def update locale = params[:locale].to_s if available_locales.include?(locale.to_sym) [:pgbus_locale] = { value: locale, expires: 1.year.from_now, path: "/" } I18n.locale = locale end redirect_back fallback_location: pgbus.root_path end |