diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-04-18 01:25:50 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-04-18 01:25:50 +0200 |
commit | 57d784f1e454af5500b608b7a3fd1452ecbb9e6a (patch) | |
tree | b9c4330970b1d2a62a2d41b90a6d03e2bc303b38 /app/controllers | |
parent | 16d50f60d1f802ee7760ca24883df2ed5a8f4ac0 (diff) | |
parent | ffb99325cafb5b00ee652c6b3ed2811a4d643fc8 (diff) |
Merge branch 'pause-gif' of git://github.com/patf/mastodon into patf-pause-gif
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/settings/preferences_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index c758e4ef2..f66eb9752 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -24,8 +24,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' + current_user.settings['auto_play_gif'] = user_params[:setting_auto_play_gif] == '1' - if current_user.update(user_params.except(:notification_emails, :interactions, :setting_default_privacy, :setting_boost_modal)) + if current_user.update(user_params.except(:notification_emails, :interactions, :setting_default_privacy, :setting_boost_modal, :setting_auto_play_gif)) redirect_to settings_preferences_path, notice: I18n.t('generic.changes_saved_msg') else render action: :show @@ -35,6 +36,6 @@ class Settings::PreferencesController < ApplicationController private def user_params - 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]) + params.require(:user).permit(:locale, :setting_default_privacy, :setting_boost_modal, :setting_auto_play_gif, notification_emails: [:follow, :follow_request, :reblog, :favourite, :mention, :digest], interactions: [:must_be_follower, :must_be_following]) end end |