Create Readouts controller
Move #readouts + #toggle_exposure from Measurements to Readouts
This commit is contained in:
@@ -22,6 +22,10 @@ module BodyTrackersHelper
|
||||
t&.strftime("%R")
|
||||
end
|
||||
|
||||
def format_datetime(dt)
|
||||
dt.strftime("%F <small>%R (~#{time_ago_in_words(dt)} ago)</small>").html_safe
|
||||
end
|
||||
|
||||
def toggle_exposure_options(enabled, domain = :all)
|
||||
enabled = enabled.map { |q| [q.name, q.id] }
|
||||
enabled_ids = enabled.map(&:last)
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
module MeasurementsHelper
|
||||
def format_datetime(m)
|
||||
m.taken_at
|
||||
.strftime("%F <small>%R (~#{time_ago_in_words(m.taken_at)} ago)</small>")
|
||||
.html_safe
|
||||
end
|
||||
|
||||
def action_links(m)
|
||||
link_to(l(:button_retake), retake_measurement_path(m, @view_params),
|
||||
{remote: true, class: "icon icon-reload"}) +
|
||||
|
||||
Reference in New Issue
Block a user