1
0

Moved adjust from IngredientsController to MealsController

This commit is contained in:
cryptogopher
2020-05-02 16:49:54 +02:00
parent 4397249fa9
commit b3f7199f93
6 changed files with 23 additions and 12 deletions

View File

@@ -0,0 +1,9 @@
$('tr[id=ingredient-<%= @ingredient.id %>]').replaceWith(
'<%= j render partial: 'meals/show_ingredient', locals: {i: @ingredient} %>'
);
$('tr[id=meal-<%= @meal.id %>]').replaceWith(
'<%= j render partial: 'meals/show', locals: {m: @meal, index: @meal_index} %>'
);
$('tr[id=date-<%= @date.strftime('%Y%m%d') %>]').replaceWith(
'<%= j render partial: 'meals/show_date', locals: {date: @date} %>'
);