Rails 4 raw html_safe not working -
i not able escape raw html tags in view
<% array = @article.tags.collect { |p| (link_to p.name, '#') } %> <%= array.join(' , ') %>
raw , html_safe
<% array = @article.tags.collect { |p| raw (link_to p.name, '#') } %> <% array = @article.tags.collect { |p| (link_to p.name, '#').html_safe } %>
giving me output, without escaping html tags
<a href="#">tag1</a> , <a href="#">tag2</a> , <a href="#">tag4</a>
this solved problem
<%= raw (@article.tags.map { |p| (link_to p.name, '#') }.join(' , ')) %>