Class: Sprangular::LocaleController
- Inherits:
-
BaseController
- Object
- Spree::BaseController
- BaseController
- Sprangular::LocaleController
- Defined in:
- app/controllers/sprangular/locale_controller.rb
Overview
API Endpoint to set locale for session
Instance Method Summary collapse
Methods inherited from BaseController
#invalid_resource!, #not_found, #unauthorized
Instance Method Details
#show ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'app/controllers/sprangular/locale_controller.rb', line 5 def show session[:locale] = params[:locale] respond_to do |format| format.js { render js: "window.location.reload" } format.html { redirect_to sprangular_engine.root_path } end end |