Skip to content

Commit

Permalink
fix: numbered_by form error
Browse files Browse the repository at this point in the history
Add hidden field with current value to prevent validation errors
  • Loading branch information
mromulus committed Dec 5, 2023
1 parent 77d5c38 commit 182e74f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/views/virtual_machines/_deployment_section.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.grid.gap-6.grid-cols-2
= f.hidden_field :numbered_by, value: @virtual_machine.numbered_by.to_gid
= f.input :numbered_by, NumberingOptions.result_for(@virtual_machine, hash: { as: :select,input_html: { data: { controller: 'select' } }, selected: @virtual_machine.numbered_by&.to_gid })
= f.input :custom_instance_count
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ en:
attributes:
name:
invalid: is invalid (must not contain _)
numbered_by:
incoherent_numbering: would result in numbering incoherence
address:
attributes:
offset:
Expand Down

0 comments on commit 182e74f

Please sign in to comment.