aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/number_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/helpers/number_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/number_helper.rb1
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 3db1394df7..43122ef2ba 100644
--- a/actionpack/lib/action_view/helpers/number_helper.rb
+++ b/actionpack/lib/action_view/helpers/number_helper.rb
@@ -127,6 +127,7 @@ module ActionView
defaults = I18n.translate(:'number.format', :locale => options[:locale], :default => {})
currency = I18n.translate(:'number.currency.format', :locale => options[:locale], :default => {})
+ currency[:negative_format] ||= "-" + currency[:format] if currency[:format]
defaults = DEFAULT_CURRENCY_VALUES.merge(defaults).merge!(currency)
defaults[:negative_format] = "-" + options[:format] if options[:format]