1
0

Measurement index/form running

This commit is contained in:
cryptogopher
2019-11-16 18:47:53 +01:00
parent 22aeda720d
commit a619b74dce
3 changed files with 20 additions and 1 deletions

View File

@@ -1,2 +1,19 @@
module MeasurementsHelper
def quantity_options
nested_set_options(@project.quantities.measurement) do |q|
raw("#{' ' * q.level}#{q.name}")
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]
end
end
end