about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-04-11 20:43:56 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-04-11 20:43:56 +0200
commit2a7602cad449da3590cb1eac2a86a3e5cc606966 (patch)
treee315f30c6cb4b40b670e9cbd15065851d5f44a33 /app/controllers
parentb723ee73fc7d74fd5908eb09a8f6b98e73597c2b (diff)
parent06444bf050a267da7001c2801480c5fae3e1559e (diff)
Merge branch 'master' of https://github.com/blackle/mastodon into blackle-master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/settings/preferences_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb
index 60400e465..c758e4ef2 100644
--- a/app/controllers/settings/preferences_controller.rb
+++ b/app/controllers/settings/preferences_controller.rb
@@ -23,8 +23,9 @@ class Settings::PreferencesController < ApplicationController
     }
 
     current_user.settings['default_privacy'] = user_params[:setting_default_privacy]
+    current_user.settings['boost_modal'] = user_params[:setting_boost_modal] == '1'
 
-    if current_user.update(user_params.except(:notification_emails, :interactions, :setting_default_privacy))
+    if current_user.update(user_params.except(:notification_emails, :interactions, :setting_default_privacy, :setting_boost_modal))
       redirect_to settings_preferences_path, notice: I18n.t('generic.changes_saved_msg')
     else
       render action: :show
@@ -34,6 +35,6 @@ class Settings::PreferencesController < ApplicationController
   private
 
   def user_params
-    params.require(:user).permit(:locale, :setting_default_privacy, notification_emails: [:follow, :follow_request, :reblog, :favourite, :mention, :digest], interactions: [:must_be_follower, :must_be_following])
+    params.require(:user).permit(:locale, :setting_default_privacy, :setting_boost_modal, notification_emails: [:follow, :follow_request, :reblog, :favourite, :mention, :digest], interactions: [:must_be_follower, :must_be_following])
   end
 end