Format money amounts according to locale

It used to be formatted according to the currency. So even if the
default currency is USD but your locale is French then you should see it
formatted as $10.000,00 instead of the US formatting of $10,000.00.
This commit is contained in:
Maikel Linke
2023-10-16 11:19:11 +11:00
parent c87a10a855
commit fcb6e36480

View File

@@ -1,4 +1,5 @@
Rails.application.reloader.to_prepare do
Money.locale_backend = :i18n
Money.rounding_mode = BigDecimal::ROUND_HALF_EVEN
Money.default_currency = Money::Currency.new(ENV.fetch('CURRENCY'))
end