From 0f04b2fb10320d6ac9e0b37d93ef318ecefcc90d Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 23 Jul 2024 13:51:32 +1000 Subject: [PATCH] Fix call to ActiveSupport::NumberHelper.number_to_rounded When running with :hu locale, call to `number_to_rounded` wiht parameter precision: nil breaks, adding significant: false fixes the issue --- app/models/spree/product.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/spree/product.rb b/app/models/spree/product.rb index 2aa558a5ada..3703cc1864e 100755 --- a/app/models/spree/product.rb +++ b/app/models/spree/product.rb @@ -264,6 +264,7 @@ def ensure_standard_variant def variant_unit_with_scale scale_clean = ActiveSupport::NumberHelper.number_to_rounded(variant_unit_scale, precision: nil, + significant: false, strip_insignificant_zeros: true) [variant_unit, scale_clean].compact_blank.join("_") end