aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-04-11 09:04:31 -0700
committerXavier Noria <fxn@hashref.com>2012-04-11 09:04:31 -0700
commit6da500279beeffdba298f4c68b54c1bc1e92d1ef (patch)
treea52313b880632ac94314710c49a1592c9139c56e /actionpack/lib/action_view
parentb79b784f7290fdfab917bb8e44a9477a709318c5 (diff)
parent332c3e14ceab14c0c4a48f4c5ffe25ca4bf77e14 (diff)
downloadrails-6da500279beeffdba298f4c68b54c1bc1e92d1ef.tar.gz
rails-6da500279beeffdba298f4c68b54c1bc1e92d1ef.tar.bz2
rails-6da500279beeffdba298f4c68b54c1bc1e92d1ef.zip
Merge pull request #5792 from lest/patch-4
no need in temporary array in number_to_phone helper
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/number_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb
index fc895fb7bc..d3a7a1bb96 100644
--- a/actionpack/lib/action_view/helpers/number_helper.rb
+++ b/actionpack/lib/action_view/helpers/number_helper.rb
@@ -74,11 +74,11 @@ module ActionView
number.slice!(0, 1) if number.start_with?(delimiter) && !delimiter.blank?
end
- str = []
+ str = ''
str << "+#{country_code}#{delimiter}" unless country_code.blank?
str << number
str << " x #{extension}" unless extension.blank?
- ERB::Util.html_escape(str.join)
+ ERB::Util.html_escape(str)
end
# Formats a +number+ into a currency string (e.g., $13.65). You can customize the format