Class: Decidim::LocalesController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::LocalesController
- Defined in:
- decidim-core/app/controllers/decidim/locales_controller.rb
Overview
A controller to allow users switching their locale.
Instance Method Summary collapse
Methods included from UserBlockedChecker
#check_user_block_status, #check_user_not_blocked
Methods included from NeedsSnippets
Methods included from Headers::HttpCachingDisabler
Methods included from HasStoredPath
#skip_store_location?, #store_current_location
Methods included from RegistersPermissions
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 |
# File 'decidim-core/app/controllers/decidim/locales_controller.rb', line 8 def create :create, :locales current_user.update!(locale: params["locale"]) if current_user && params["locale"] && available_locales.include?(params["locale"]) redirect_to referer_with_new_locale end |