From 332c3e14ceab14c0c4a48f4c5ffe25ca4bf77e14 Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Mon, 9 Apr 2012 21:40:54 +0300 Subject: no need in temporary array in number_to_phone helper --- actionpack/lib/action_view/helpers/number_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view') 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 -- cgit v1.2.3