Move :base_id hidden field to form tag

This commit is contained in:
cryptogopher 2025-01-08 14:36:32 +01:00
parent 9461c1f979
commit 23e2f6a062
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,6 @@
</td>
<td class="number">
<% unless @unit.base.nil? %>
<%= form.hidden_field :base_id %>
<%= form.number_field :multiplier, required: true, size: 10, min: :step %>
<% end %>
</td>

View File

@ -7,7 +7,8 @@
<%= turbo_stream.disable ids[:link] -%>
<%= turbo_stream.append :unit_form do %>
<%- tabular_form_with model: @unit, html: {id: ids[:form_tag]} do %>
<%- tabular_form_with model: @unit, html: {id: ids[:form_tag]} do |form| %>
<%= form.hidden_field :base_id unless @unit.base.nil? %>
<% end %>
<% end %>