1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request from lest/patch-4

no need in temporary array in number_to_phone helper
This commit is contained in:
Xavier Noria 2012-04-11 09:04:31 -07:00
commit 6da500279b

View file

@ -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