1
0

Added eaten_at to Meal form

This commit is contained in:
cryptogopher
2020-04-24 16:53:24 +02:00
parent cdd7107567
commit 1007385e1f
7 changed files with 40 additions and 10 deletions

View File

@@ -11,6 +11,10 @@ module BodyTrackersHelper
end
end
def format_time(t)
t.strftime("%R") if t
end
def unit_options
@project.units.map do |u|
[u.shortname, u.id]

View File

@@ -1,14 +1,10 @@
module MeasurementsHelper
def format_datetime(m)
m.taken_at.getlocal
m.taken_at
.strftime("%F <small>%R&emsp;(~#{time_ago_in_words(m.taken_at)} ago)</small>")
.html_safe
end
def format_time(m)
m.taken_at.getlocal.strftime("%R")
end
def toggle_column_options
disabled = []
enabled_quantities = @routine.quantities.to_a