mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Tiny refactor
This commit is contained in:
parent
321bf95370
commit
54117b6961
1 changed files with 2 additions and 3 deletions
|
@ -28,8 +28,7 @@ module ActionView #:nodoc:
|
||||||
# # => "<p>foo</p><br /><p>bar</p>"
|
# # => "<p>foo</p><br /><p>bar</p>"
|
||||||
#
|
#
|
||||||
def safe_join(array, sep=$,)
|
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
|
array.map { |i| ERB::Util.html_escape(i) }.join(sep).html_safe
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue