ruby on rails - Using link_to make an image the link -


i need link image profile_path(thing.user)

<%= image_tag thing.user.photo.url(:small), { :class=>"rounded_square" ,     style: "margin-left:8px; text-align:center; vertical-align:middle;" } %> 

link_to should take block if nothing helps:

<%= link_to profile_path(thing.user) %>     <%= image_tag thing.user.photo.url(:small), { :class=>"rounded_square" , style: "margin-left:8px; text-align:center; vertical-align:middle;" } %> <% end %> 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -