Q:

Add HTML in a Link_to - Rails

Can I add HTML in a link_to?
For example, instead of <%= link_to post.title, post %> I'd prefer:
<%= link_to '<span>post.title</span>', post %>

A:

Use block:
<%= link_to(post) do %>
  <span>Test</span>
<% end %>

