Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

no need in temporary array in number_to_phone helper #5792

Merged
merged 1 commit into from Apr 11, 2012
Jump to file or symbol
Failed to load files and symbols.
+2 −2
Split
@@ -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