diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-07 00:23:38 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-07 00:23:38 +0100 |
commit | 714e41d472eee88780fb1194b3e53e434104d557 (patch) | |
tree | 76718de6b095492e4e6e047e8a40f1d2e50446c6 /app/controllers/settings | |
parent | ac035108aaa2585af146fc28e4a2314c06e63e65 (diff) |
Fix preferences save
Diffstat (limited to 'app/controllers/settings')
-rw-r--r-- | app/controllers/settings/preferences_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index 40888963e..b7479bf8c 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -21,9 +21,9 @@ class Settings::PreferencesController < ApplicationController must_be_following: user_params[:interactions][:must_be_following] == '1', } - current_user.settings['default_privacy'] = user_params[:settings][:default_privacy] + current_user.settings['default_privacy'] = user_params[:setting_default_privacy] - if current_user.update(user_params.except(:notification_emails, :interactions, :settings)) + if current_user.update(user_params.except(:notification_emails, :interactions, :setting_default_privacy)) redirect_to settings_preferences_path, notice: I18n.t('generic.changes_saved_msg') else render action: :show @@ -33,6 +33,6 @@ class Settings::PreferencesController < ApplicationController private def user_params - params.require(:user).permit(:locale, settings: [:default_privacy], notification_emails: [:follow, :follow_request, :reblog, :favourite, :mention], interactions: [:must_be_follower, :must_be_following]) + params.require(:user).permit(:locale, :setting_default_privacy, notification_emails: [:follow, :follow_request, :reblog, :favourite, :mention], interactions: [:must_be_follower, :must_be_following]) end end |