mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: Saving a user field as required
didn't work the first time
This commit is contained in:
parent
360a794335
commit
5fcd5002c4
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ class Admin::UserFieldsController < Admin::AdminController
|
|||
field = UserField.new(params.require(:user_field).permit(*Admin::UserFieldsController.columns))
|
||||
|
||||
field.position = (UserField.maximum(:position) || 0) + 1
|
||||
field.required = params[:required] == "true"
|
||||
field.required = params[:user_field][:required] == "true"
|
||||
update_options(field)
|
||||
|
||||
json_result(field, serializer: UserFieldSerializer) do
|
||||
|
|
Loading…
Reference in a new issue