FIX: Saving a field as not required was actually making it required
until you edited it.
This commit is contained in:
parent
dd16ff81be
commit
2322586131
|
@ -6,6 +6,7 @@ class Admin::UserFieldsController < Admin::AdminController
|
|||
|
||||
def create
|
||||
field = UserField.new(params.require(:user_field).permit(*Admin::UserFieldsController.columns))
|
||||
field.required = params[:required] == "true"
|
||||
json_result(field, serializer: UserFieldSerializer) do
|
||||
field.save
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue