#472: Update Users::SettingsController
This commit is contained in:
parent
5595936c48
commit
42e6aeaede
|
@ -40,7 +40,7 @@ class Users::SettingsController < Users::BaseController
|
||||||
|
|
||||||
def notifiers
|
def notifiers
|
||||||
if request.patch?
|
if request.patch?
|
||||||
if @user.notifier.update_attributes(params[:settings_notifier])
|
if @user.notifier.update_attributes(settings_notifier_params)
|
||||||
flash[:notice] = I18n.t("flash.settings.saved")
|
flash[:notice] = I18n.t("flash.settings.saved")
|
||||||
redirect_to notifiers_settings_path and return
|
redirect_to notifiers_settings_path and return
|
||||||
end
|
end
|
||||||
|
@ -61,6 +61,10 @@ class Users::SettingsController < Users::BaseController
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def settings_notifier_params
|
||||||
|
subject_params(SettingsNotifier)
|
||||||
|
end
|
||||||
|
|
||||||
def user_params
|
def user_params
|
||||||
subject_params(User)
|
subject_params(User)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue