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.
cryptogopher f00f93c9e9 View tracking through params in Ingredients
Squeezed ingredient form
2020-04-04 02:13:46 +02:00

9 lines
433 B
Plaintext

$('tr[id=ingredient-<%= @ingredient.id %>]').nextUntil('tr.primary', ':not(.ingredient)')
.remove();
var columns = $('table > thead > tr > th').length;
$('tr[id=ingredient-<%= @ingredient.id %>]').nextUntil('tr.primary').addBack().last().after(
'<tr><td class="form" colspan="'+columns+'"><div id="edit-ingredient">' +
'<%= j render partial: 'ingredients/edit_form', locals: {view: params[:view]} %>' +
'</div></td></tr>'
);