In a Rails app I have helper methods that render html snippets, e.g. Twitter bootstrap fonts
def edit_icon
content_tag(:i, "", :class=>'icon-edit')
end
I want to display this in a link anchor with additional text appended. e.g.
<%= link_to "#{edit_icon} Edit this Record", edit_record_path(@record) %>
This is currently rendering the content_tag as a string, not as HTML. How do I render it as HTML?
I experimented with <%= link_to "#{raw edit_icon} and <%= link_to "#{edit_icon.html_safe}, but these don't seem to be what I need in this case.
Thanks for any ideas.