mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Force significant: false for NumberHelper
Although it defaults to false, somehow it seems to be evaluated as true on hu_prod...??!?!!1! (https://github.com/openfoodfoundation/openfoodnetwork/issues/12682) Maybe this will help.
This commit is contained in:
@@ -25,7 +25,7 @@ class WeightsAndMeasures
|
||||
available_units_sorted.flat_map do |measurement, measurement_info|
|
||||
measurement_info.filter_map do |scale, unit_info|
|
||||
scale_clean =
|
||||
ActiveSupport::NumberHelper.number_to_rounded(scale, precision: nil,
|
||||
ActiveSupport::NumberHelper.number_to_rounded(scale, precision: nil, significant: false,
|
||||
strip_insignificant_zeros: true)
|
||||
[
|
||||
"#{I18n.t(measurement)} (#{unit_info['name']})", # Label (eg "Weight (g)")
|
||||
|
||||
Reference in New Issue
Block a user