#472: Update Users::SettingsController

This commit is contained in:
Vokhmin Alexey V 2015-05-28 01:32:41 +03:00
parent 5595936c48
commit 42e6aeaede
1 changed files with 5 additions and 1 deletions

View File

@ -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