1
0

Added nested nutrients in ingredient form

This commit is contained in:
cryptogopher
2019-09-13 19:21:28 +02:00
parent c82f903360
commit f039917d0e
7 changed files with 24 additions and 2 deletions

View File

@@ -1,4 +1,10 @@
module IngredientsHelper
def quantity_options
nested_set_options(@project.quantities.diet) do |q|
raw("#{' ' * q.level}#{q.name}")
end
end
def unit_options
@project.units.map do |u|
[u.shortname, u.id]