New objects are now created through association
Added Sources to sidebar
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :name, size: 40, required: true %></p>
|
||||
<p>
|
||||
<%= f.number_field :ref_amount, size: 8, required: true, min: 0 %>
|
||||
<%= f.number_field :ref_amount, size: 8, required: true, min: 0, label: :field_reference %>
|
||||
<%= f.select :ref_unit_id, unit_options, {label: '', required: true} %>
|
||||
</p>
|
||||
<p><%= f.select :group, group_options, required: true %></p>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
|
||||
<h2><%= t ".heading" %></h2>
|
||||
<% if @ingredients.any? %>
|
||||
<% if @ingredients.many? %>
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -59,6 +59,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @ingredients.each do |i| %>
|
||||
<% next if i.new_record? %>
|
||||
<tr id="ingredient-<%= i.id %>" class="ingredient <%= 'hidden' if i.hidden %>">
|
||||
<td class="name"><%= i.name %></td>
|
||||
<td class="reference"><%= i.ref_amount %> [<%= i.ref_unit.shortname %>]</td>
|
||||
|
||||
Reference in New Issue
Block a user