1
0
This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
body_tracking/app/views/foods/destroy.js.erb
cryptogopher a416e1ce9b Fixed importing Foods with QuantityValue
Fixed double flash when not followed by request
Added Food#destroy error reporting
Simplified prepare_meals with no ingredients
Renamed scope on item with subitems: subitems -> with_subitems
2020-05-20 23:33:34 +02:00

6 lines
188 B
Plaintext

<% if @food.destroyed? %>
$('tr[id=food-<%= @food.id %>]').nextUntil('tr.primary').addBack().remove();
<% else %>
$('#content').prepend('<%= j error_messages_for @food %>');
<% end %>