1
0

Add Targets #show

Change css classes from subject-oriented to property-oriented
This commit is contained in:
cryptogopher
2021-05-05 12:42:30 +02:00
parent 8cac724694
commit e301665b6a
22 changed files with 132 additions and 130 deletions

View File

@@ -37,7 +37,8 @@ class Target < ActiveRecord::Base
end
def to_s
thresholds.last.quantity.description %
thresholds.map { |t| [t.quantity.name, "#{t.value} [#{t.unit.shortname}]"] }.to_h
thresholds.last.quantity.description % thresholds.map do |t|
[t.quantity.name.to_sym, "#{t.value} [#{t.unit.shortname}]"]
end.to_h
end
end