1
0

Displaying Measurement readouts, WIP

This commit is contained in:
cryptogopher
2019-12-10 20:37:36 +01:00
parent 40e9c6f8ae
commit 98564be4b5
7 changed files with 200 additions and 11 deletions

View File

@@ -1,4 +1,12 @@
module MeasurementsHelper
def format_datetime(m)
m.taken_at.getlocal.strftime("%F <small>%R</small>").html_safe
end
def format_time(m)
m.taken_at.getlocal.strftime("%R")
end
def quantity_options
nested_set_options(@project.quantities.measurement) do |q|
raw("#{'&ensp;' * q.level}#{q.name}")