1
0

Added setting Formula unit in form and when loading defaults

This commit is contained in:
cryptogopher
2020-03-25 21:40:24 +01:00
parent 031b857925
commit 2efdc08931
8 changed files with 49 additions and 39 deletions

View File

@@ -10,4 +10,10 @@ module BodyTrackersHelper
"#{amount} [#{unitname || '-'}]"
end
end
def unit_options
@project.units.map do |u|
[u.shortname, u.id]
end
end
end

View File

@@ -20,12 +20,6 @@ module IngredientsHelper
options_for_select(options, selected)
end
def unit_options
@project.units.map do |u|
[u.shortname, u.id]
end
end
def source_options
@project.sources.map do |s|
[s.name, s.id]

View File

@@ -25,12 +25,6 @@ module MeasurementsHelper
end
end
def unit_options
@project.units.map do |u|
[u.shortname, u.id]
end
end
def source_options
@project.sources.map do |s|
[s.name, s.id]