diff options
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/number_helper.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index b1757c864c..6c66616e1a 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -37,6 +37,7 @@ module ActionView def number_to_currency(number, options = {}) options = options.stringify_keys precision, unit, separator, delimiter = options.delete("precision") { 2 }, options.delete("unit") { "$" }, options.delete("separator") { "." }, options.delete("delimiter") { "," } + separator = "" unless precision > 0 begin parts = number_with_precision(number, precision).split('.') unit + number_with_delimiter(parts[0], delimiter) + separator + parts[1].to_s |