Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

no need in temporary array in number_to_phone helper #5792

Merged
merged 1 commit into from

2 participants

@lest

No description provided.

@fxn fxn merged commit 6da5002 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 9, 2012
  1. @lest
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_view/helpers/number_helper.rb
View
4 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
Something went wrong with that request. Please try again.