add field default values

This commit is contained in:
Pete Matsyburka
2023-11-05 01:41:54 +02:00
parent 7210badde9
commit 59d9a59769
6 changed files with 153 additions and 45 deletions
+7 -5
View File
@@ -52,11 +52,13 @@ module Api
end
def template_params
params.require(:template).permit(:name,
schema: [%i[attachment_uuid name]],
submitters: [%i[name uuid]],
fields: [[:uuid, :submitter_uuid, :name, :type, :required,
{ options: [], areas: [%i[x y w h cell_w attachment_uuid page]] }]])
params.require(:template).permit(
:name,
schema: [%i[attachment_uuid name]],
submitters: [%i[name uuid]],
fields: [[:uuid, :submitter_uuid, :name, :type, :required, :readonly, :default_value,
{ options: [], areas: [%i[x y w h cell_w attachment_uuid page]] }]]
)
end
end
end