Dispplaying units of computed values
Fixed formula error messages display when filter formula not given
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
module BodyTrackersHelper
|
||||
def format_value(value)
|
||||
amount, unitname = value
|
||||
amount, unit = value
|
||||
case
|
||||
when amount.nil?
|
||||
'-'
|
||||
when amount.nan?
|
||||
'?'
|
||||
else
|
||||
"#{amount} [#{unitname || '-'}]"
|
||||
"#{amount} [#{unit.shortname || '-'}]"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user