Add allow long questions option to profile settings

This commit is contained in:
Karina Kwiatek 2023-01-08 13:13:03 +01:00
parent 09d110eb58
commit ba7b19faee
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@ class Settings::ProfileController < ApplicationController
def edit; end
def update
profile_attributes = params.require(:profile).permit(:display_name, :motivation_header, :website, :location, :description, :anon_display_name)
profile_attributes = params.require(:profile).permit(:display_name, :motivation_header, :website, :location, :description, :anon_display_name, :allow_long_questions)
if current_user.profile.update(profile_attributes)
flash[:success] = t(".success")

View File

@ -49,6 +49,8 @@
= f.text_area :description
= f.check_box :allow_long_questions
= f.primary
- provide(:title, generate_title(t(".title")))