aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/number_helper.rb
diff options
context:
space:
mode:
authorhoffm <m@hof.fm>2013-02-20 16:15:59 -0500
committerBrian Samson <brian@briansamson.com>2013-03-19 09:30:50 -0500
commit1b12d08a0f8489f0f3970f6d5e40ed119127c856 (patch)
treec01136dfb1696551640387bb0019bd23d903f29b /actionpack/lib/action_view/helpers/number_helper.rb
parent2cf38aebacaf78260848a54bfbb5bf5a9b627598 (diff)
downloadrails-1b12d08a0f8489f0f3970f6d5e40ed119127c856.tar.gz
rails-1b12d08a0f8489f0f3970f6d5e40ed119127c856.tar.bz2
rails-1b12d08a0f8489f0f3970f6d5e40ed119127c856.zip
Backport #9347 to rails 3.2
Diffstat (limited to 'actionpack/lib/action_view/helpers/number_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/number_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb
index 4519230fda..ad86d13456 100644
--- a/actionpack/lib/action_view/helpers/number_helper.rb
+++ b/actionpack/lib/action_view/helpers/number_helper.rb
@@ -593,7 +593,7 @@ module ActionView
unit = case units
when Hash
- units[DECIMAL_UNITS[display_exponent]]
+ units[DECIMAL_UNITS[display_exponent]] || ''
when String, Symbol
I18n.translate(:"#{units}.#{DECIMAL_UNITS[display_exponent]}", :locale => options[:locale], :count => number.to_i)
else