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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -