diff options
author | Pablo Herrero <pablodherrero@gmail.com> | 2014-10-18 03:47:05 -0300 |
---|---|---|
committer | Pablo Herrero <pablodherrero@gmail.com> | 2014-10-29 16:20:52 -0300 |
commit | c02a7e4f8239006ad01d1ca5d28f47cf9563920e (patch) | |
tree | 416e5ae7a64d142ca25b49a7aef94a6c7d6d7f48 /activesupport/lib/active_support/number_helper/number_to_currency_converter.rb | |
parent | 94c1a72aa9d943def7a160ec058ebeabcd032739 (diff) | |
download | rails-c02a7e4f8239006ad01d1ca5d28f47cf9563920e.tar.gz rails-c02a7e4f8239006ad01d1ca5d28f47cf9563920e.tar.bz2 rails-c02a7e4f8239006ad01d1ca5d28f47cf9563920e.zip |
Do gsub with a regexp instead of a string
Diffstat (limited to 'activesupport/lib/active_support/number_helper/number_to_currency_converter.rb')
-rw-r--r-- | activesupport/lib/active_support/number_helper/number_to_currency_converter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb b/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb index 9ae27a896a..fb5adb574a 100644 --- a/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb @@ -13,7 +13,7 @@ module ActiveSupport end rounded_number = NumberToRoundedConverter.convert(number, options) - format.gsub('%n', rounded_number).gsub('%u', options[:unit]) + format.gsub(/%n/, rounded_number).gsub(/%u/, options[:unit]) end private |