diff --git a/app/controllers/users/settings_controller.rb b/app/controllers/users/settings_controller.rb index 91320b67b..27603a9b2 100644 --- a/app/controllers/users/settings_controller.rb +++ b/app/controllers/users/settings_controller.rb @@ -40,7 +40,7 @@ class Users::SettingsController < Users::BaseController def notifiers 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") redirect_to notifiers_settings_path and return end @@ -61,6 +61,10 @@ class Users::SettingsController < Users::BaseController private + def settings_notifier_params + subject_params(SettingsNotifier) + end + def user_params subject_params(User) end