Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/rails_join.rb
Instance Method Summary collapse
Instance Method Details
#join_with_safe_buffer_awareness(sep = $,) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/rails_join.rb', line 6 def join_with_safe_buffer_awareness(sep = $,) f = first if f.is_a?(ActiveSupport::SafeBuffer) && f.html_safe? map { |i| ERB::Util.html_escape(i) }.join_without_safe_buffer_awareness(ERB::Util.html_escape(sep)).html_safe else join_without_safe_buffer_awareness(sep) end end |