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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -