Permalink
Browse files

no need in temporary array in number_to_phone helper

  • Loading branch information...
1 parent 84adc21 commit 332c3e14ceab14c0c4a48f4c5ffe25ca4bf77e14 @lest lest committed Apr 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_view/helpers/number_helper.rb
@@ -74,11 +74,11 @@ def number_to_phone(number, options = {})
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

0 comments on commit 332c3e1

Please sign in to comment.