i have following in html.erb file:
<%= image_tag "logo.jpg", :class => "img-responsive", :href =>"http://www.google.com" %>
however, not clickable link. assumed :href = > make so. have ideas of making rails image clickable link? tried following logic found on stack overflow post:
<%= link_to image_tag("logo.jpg", :class => "img-responsive"), "http://wwww.google.com" %>
but makes image smaller , adds odd half circle @ bottom of image. cannot add :style
or :class
working properly.
anyone have ideas?
not sure if best way, wrap image tag regular anchor tags:
<a href="http://www.google.com"> <%= image_tag "logo.jpg", :class => "img-responsive" %> </a>
Comments
Post a Comment