1
0

Added nested nutrients in ingredient form

This commit is contained in:
cryptogopher
2019-09-13 19:21:28 +02:00
parent c82f903360
commit f039917d0e
7 changed files with 24 additions and 2 deletions

View File

@@ -7,4 +7,11 @@
<%= f.select :ref_unit_id, unit_options, {label: '', required: true} %>
</p>
<p><%= f.select :group, group_options, required: true %></p>
<%= f.fields_for :nutrients, @nutrient do |ff| %>
<p>
<%= ff.select :quantity_id, quantity_options, {label: '', required: true} %>
<%= ff.number_field :amount, {size: 8, label: '', required: true} %>
<%= ff.select :unit_id, unit_options, {label: '', required: true} %>
</p>
<% end %>
</div>