Class: Lesli::AppsController
- Inherits:
-
ApplicationLesliController
- Object
- ActionController::Base
- ApplicationController
- ApplicationLesliController
- Lesli::AppsController
- Defined in:
- app/controllers/lesli/apps_controller.rb
Instance Attribute Summary
Attributes inherited from ApplicationController
Instance Method Summary collapse
Methods inherited from ApplicationLesliController
Methods included from CustomizationInterface
Methods included from ResponderInterface
#respond_with_action, #respond_with_http, #respond_with_json, #respond_with_json_not_found, #respond_with_json_unauthorized, #respond_with_lesli, #respond_with_not_found, #respond_with_pagination, #respond_with_unauthorized, #stream_redirection
Methods included from RequesterInterface
Methods inherited from ApplicationController
Constructor Details
This class inherits a constructor from Lesli::ApplicationController
Instance Method Details
#language ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/lesli/apps_controller.rb', line 8 def language # check if param locale was sent by the user unless params[:locale].blank? locale = params[:locale].to_sym # check if locale requested is valid if I18n.available_locales.include?(locale) # save requested locale in session # this will be used in application_controller#switch_locale session[:locale] = locale end end I18n.locale = locale redirect_back(fallback_location: request.referer) end |
#show ⇒ Object
4 5 6 |
# File 'app/controllers/lesli/apps_controller.rb', line 4 def show # renders the engine selector view end |