Class: StompBase::SettingsController
Instance Method Summary
collapse
Methods included from I18nHelper
#available_locales, #current_locale, #locale_name, #t
Instance Method Details
#index ⇒ Object
8
9
10
|
# File 'app/controllers/stomp_base/settings_controller.rb', line 8
def index
end
|
#update ⇒ Object
12
13
14
15
16
17
18
|
# File 'app/controllers/stomp_base/settings_controller.rb', line 12
def update
update_locale_setting(params[:locale]) if params[:locale]
update_theme_setting(params[:theme]) if params[:theme]
safe_redirect_with_notice(t("stomp_base.settings.settings_updated"))
end
|
#update_locale ⇒ Object
20
21
22
23
24
25
26
27
28
29
|
# File 'app/controllers/stomp_base/settings_controller.rb', line 20
def update_locale
locale = params[:locale]
if valid_locale?(locale)
update_user_locale(locale)
render_success_response(locale)
else
render_error_response
end
end
|