Add user requirement setting to privacy settings
This commit is contained in:
parent
cdc7e2b9cc
commit
18b3ac641b
|
@ -9,7 +9,8 @@ class Settings::PrivacyController < ApplicationController
|
|||
user_attributes = params.require(:user).permit(:privacy_allow_anonymous_questions,
|
||||
:privacy_allow_public_timeline,
|
||||
:privacy_allow_stranger_answers,
|
||||
:privacy_show_in_search)
|
||||
:privacy_show_in_search,
|
||||
:privacy_require_user)
|
||||
if current_user.update(user_attributes)
|
||||
flash[:success] = t(".success")
|
||||
else
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
.card-body
|
||||
= bootstrap_form_for(current_user, url: settings_privacy_path, method: :patch, data: { turbo: false }) do |f|
|
||||
= f.check_box :privacy_allow_anonymous_questions
|
||||
= f.check_box :privacy_require_user
|
||||
= f.check_box :privacy_allow_public_timeline
|
||||
= f.check_box :privacy_allow_stranger_answers
|
||||
|
||||
|
|
Loading…
Reference in New Issue