FIX: Saving a user field as `required` didn't work the first time
This commit is contained in:
parent
360a794335
commit
5fcd5002c4
|
@ -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 New Issue