diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-04-01 23:59:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 23:59:13 +0200 |
commit | 0a8a0fb5990eb6d3842948654d0b6140e776d8a9 (patch) | |
tree | 744e3440f6e557d79eb6e77a9b39a8b8b377587e | |
parent | 39b489ba4c362997b41dd039971b8b510f6fe10d (diff) |
Fix unusual number formatting in some locales (#17929)
* Fix unusual number formatting in some locales Fixes #17904 * Fix typo
-rw-r--r-- | app/helpers/application_helper.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 651a98a85..9984820da 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -19,8 +19,11 @@ module ApplicationHelper # is looked up from the locales definition, and rails-i18n comes with # values that don't seem to make much sense for many languages, so # override these values with a default of 3 digits of precision. - options[:precision] = 3 - options[:strip_insignificant_zeros] = true + options = options.merge( + precision: 3, + strip_insignificant_zeros: true, + significant: true + ) number_to_human(number, **options) end |