1
0

Added ingredient index and form

This commit is contained in:
cryptogopher
2019-09-13 14:48:43 +02:00
parent c916e7fd3c
commit c82f903360
9 changed files with 77 additions and 22 deletions

View File

@@ -1,2 +1,14 @@
module IngredientsHelper
def unit_options
@project.units.map do |u|
[u.shortname, u.id]
end
end
def group_options
translations = t('.groups')
Ingredient.groups.map do |k,v|
[translations[k.to_sym], k]
end
end
end