This project is archived and is in readonly mode.
[PATCH] number_to_currency should take configured format for default negative format
Reported by Sokolov Yura | March 30th, 2011 @ 07:24 PM
By resolved ticket #5894 number_to_currency compose default
:negative_format
only from options sent to method or
takes it from DEFAULT_CURRENCY_VALUES
.
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.
Comments and changes to this ticket
-
Sokolov Yura March 30th, 2011 @ 07:28 PM
- no changes were found...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>