Skip to content

Commit d443479

Browse files
ulfertsEinLama
authored andcommitted
increase robustness of wizard pages in case of disabled fields only page
1 parent 1948ab4 commit d443479

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/forms/projects/wizard/custom_fields_form.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ class CustomFieldsForm < ApplicationForm
3333
include ::CustomFields::CustomFieldRendering
3434

3535
form do |custom_fields_form|
36+
# This placeholder is relevant in cases where no custom fields are rendered at all or all
37+
# custom fields rendered are disabled. Without it, the form might be completely empty and
38+
# the controller would complain about a missing parameter namespace expected by the ActionController::Parameters.
39+
custom_fields_form.hidden(name: "_placeholder", value: "")
40+
3641
render_custom_fields(form: custom_fields_form)
3742
end
3843

0 commit comments

Comments
 (0)