I think, it should also consider format specified in
I18n.translate(:'number.currency.format')
For example, gem Russian specify
ru.number.currency.format as %n %u so
that number_to_currency(10)=='10,00 rur'.
But for negative values
DEFAULT_CURRENCY_VALUES[:negative_values_format] is
used, so that number_to_currency(-10)=='-rur.10,00'
which is wrong.
If negative format were taken as '-' +
currency[:format] then formatted value will be '-10,00
rur.' which is right.
Patch below.
Reported by Sokolov Yura ·
March 30th, 2011 @ 07:24 PM