Moved adjust from IngredientsController to MealsController
This commit is contained in:
9
app/views/meals/adjust.js.erb
Normal file
9
app/views/meals/adjust.js.erb
Normal 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} %>'
|
||||
);
|
||||
Reference in New Issue
Block a user