Add profile setting for anon display name

This commit is contained in:
Karina Kwiatek 2022-06-21 14:51:22 +02:00 committed by Karina Kwiatek
parent cf0d11d860
commit 768d360ce7
2 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class UserController < ApplicationController
end
def update_profile
profile_attributes = params.require(:profile).permit(:display_name, :motivation_header, :website, :location, :description)
profile_attributes = params.require(:profile).permit(:display_name, :motivation_header, :website, :location, :description, :anon_display_name)
if current_user.profile.update(profile_attributes)
flash[:success] = t(".success")

View File

@ -41,6 +41,8 @@
= f.text_field :motivation_header
= f.text_field :anon_display_name, placeholder: APP_CONFIG[:anonymous_name]
= f.text_field :website
= f.text_field :location