diff options
author | Sergey Nartimov <just.lest@gmail.com> | 2012-04-09 21:40:54 +0300 |
---|---|---|
committer | Sergey Nartimov <just.lest@gmail.com> | 2012-04-09 21:40:54 +0300 |
commit | 332c3e14ceab14c0c4a48f4c5ffe25ca4bf77e14 (patch) | |
tree | df529d840114859cdb880b9a09458517243531c5 /actionpack/lib/action_view/helpers | |
parent | 84adc214985ff7a2c02d120ca364b6f3771cb3b3 (diff) | |
download | rails-332c3e14ceab14c0c4a48f4c5ffe25ca4bf77e14.tar.gz rails-332c3e14ceab14c0c4a48f4c5ffe25ca4bf77e14.tar.bz2 rails-332c3e14ceab14c0c4a48f4c5ffe25ca4bf77e14.zip |
no need in temporary array in number_to_phone helper
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/number_helper.rb | 4 |
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 |