From 42e6aeaede0934245fa39bcafb3ab1d051b13f5e Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Thu, 28 May 2015 01:32:41 +0300 Subject: [PATCH] #472: Update Users::SettingsController --- app/controllers/users/settings_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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