I am using link_to img tag like following
<%= link_to image_tag(\"Search.png\", :border=>0, :class => \'dock-item\'),
:action => \'search\', :co
Just adding that you can pass the link_to
method a block:
<%= link_to href: 'http://www.example.com/' do %>
<%= image_tag 'happyface.png', width: 136, height: 67, alt: 'a face that is unnervingly happy'%>
<% end %>
results in:
This has been a life saver when the designer has given me complex links with fancy css3 roll-over effects.