Allow user to disable the boost confirm dialog in preferences
This commit is contained in:
parent
f53fb6aa66
commit
06444bf050
9 changed files with 22 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue