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

php - Array to string conversion smarty template -

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -