aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/number_helper.rb
diff options
context:
space:
mode:
authorSven Fuchs <svenfuchs@artweb-design.de>2008-06-23 14:37:50 +0200
committerSven Fuchs <svenfuchs@artweb-design.de>2008-06-23 14:37:50 +0200
commitc178a87b4326edd491922136c0a55bf4b889473d (patch)
tree31744dc44bb4e4eefbf9dc69d87a0b600d9ce9e5 /actionpack/lib/action_view/helpers/number_helper.rb
parent2ee9f2a0303cba95b2d8073fc7e22ec75229a8ee (diff)
downloadrails-c178a87b4326edd491922136c0a55bf4b889473d.tar.gz
rails-c178a87b4326edd491922136c0a55bf4b889473d.tar.bz2
rails-c178a87b4326edd491922136c0a55bf4b889473d.zip
remove call to self.locale from helpers
Diffstat (limited to 'actionpack/lib/action_view/helpers/number_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/number_helper.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb
index 4373d063bb..3e0d5b1db4 100644
--- a/actionpack/lib/action_view/helpers/number_helper.rb
+++ b/actionpack/lib/action_view/helpers/number_helper.rb
@@ -69,12 +69,9 @@ module ActionView
# number_to_currency(1234567890.50, :unit => "&pound;", :separator => ",", :delimiter => "", :format => "%n %u")
# # => 1234567890,50 &pound;
def number_to_currency(number, options = {})
- options = options.symbolize_keys
-
- locale = options[:locale]
- locale ||= self.locale if respond_to?(:locale)
-
- defaults = :'currency.format'.t(locale) || {}
+ options = options.symbolize_keys
+ defaults = :'currency.format'.t(options[:locale]) || {}
+
precision = options[:precision] || defaults[:precision]
unit = options[:unit] || defaults[:unit]
separator = options[:separator] || defaults[:separator]