1
0

IngredientsController#index WIP

This commit is contained in:
cryptogopher
2020-04-18 01:22:21 +02:00
parent ed6b1b9fe7
commit 3ff36df168
8 changed files with 46 additions and 7 deletions

View File

@@ -1,5 +1,9 @@
module MealsHelper
def action_links(m)
def meal_links(m)
delete_link(meal_path(m), {remote: true, data: {}}) if m.persisted?
end
def adjust_ingredient_link(i, adjustment)
link_to "%+d" % adjustment, adjust_ingredient_path(i, adjustment: adjustment),
{remote: true, method: :post}
end
end