<% if @ingredients.any? { |i| i.persisted? } %> <% @ingredients.each do |i| %> <% next if i.new_record? %> <% end %>
<%= l(:field_name) %> <%= l(:field_reference) %> <%= l(:field_group) %> <%= l(:field_source) %> <%= l(:field_action) %>
<%= link_to '', toggle_ingredient_path(i), { remote: true, method: :post, class: "icon icon-eye" } %> <%= i.name %> <%= i.ref_amount %> [<%= i.ref_unit.shortname %>] <%= i.group %> <%= i.source.name if i.source.present? %> <%= ", #{i.source_ident}" if i.source_ident.present? %> <%= delete_link ingredient_path(i), {remote: true, data: {}} %>
<% else %>

<%= l(:label_no_data) %>

<% end %>