aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/output_safety_helper.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-01-11 20:08:43 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2012-01-11 20:08:43 -0200
commit54117b69615b5b1ba05bd9fcaec5cc66347828de (patch)
treec3942947bb4c7e1e8759dbeb5e9cffd1cbb8decd /actionpack/lib/action_view/helpers/output_safety_helper.rb
parent321bf95370bab5d863fb113d6b44694ba76ebe83 (diff)
downloadrails-54117b69615b5b1ba05bd9fcaec5cc66347828de.tar.gz
rails-54117b69615b5b1ba05bd9fcaec5cc66347828de.tar.bz2
rails-54117b69615b5b1ba05bd9fcaec5cc66347828de.zip
Tiny refactor
Diffstat (limited to 'actionpack/lib/action_view/helpers/output_safety_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/output_safety_helper.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/output_safety_helper.rb b/actionpack/lib/action_view/helpers/output_safety_helper.rb
index a035dd70ad..b36723ee1b 100644
--- a/actionpack/lib/action_view/helpers/output_safety_helper.rb
+++ b/actionpack/lib/action_view/helpers/output_safety_helper.rb
@@ -28,11 +28,10 @@ module ActionView #:nodoc:
# # => "<p>foo</p><br /><p>bar</p>"
#
def safe_join(array, sep=$,)
- sep ||= "".html_safe
- sep = ERB::Util.html_escape(sep)
+ sep = ERB::Util.html_escape(sep || "")
array.map { |i| ERB::Util.html_escape(i) }.join(sep).html_safe
end
end
end
-end \ No newline at end of file
+end