How to I replace text with an image in a nav_link Ruby? -
this nav link
<%= nav_link 'loved', loved_properties_path %>
this how insert image
<%= image_tag 'desc.svg', class: "imgstar" %>
you can define below,
<%= nav_link loved_properties_path %> <%= image_tag 'desc.svg', class: "imgstar" %> <% end %>
similar link_to
blocks.
Comments
Post a Comment