Reputation: 693
We are upgrading rails from 2.3.5 to 3.2.1. While upgrading we are getting issue with link_to method.We have the following code snippet.
link_to( name, path_options, html_options, *params )
Here name is:
<span class='bmark_link_tag'><img alt="Post this blog to Stumbleupon" src="/images/png/stumble.png" /> Stumbleupon</span>
But while rendering it is directly displaying the above name value instead of displaying image in UI.
Could you please help us on this ASAP.
Upvotes: 0
Views: 48
Reputation: 1088
You can use image_tag in link_to as,
<%= link_to image_tag("images/png/stumble.png", :alt=>"Post this blog to Stumbleupon", :class=>"bmark_link_tag")+"Stumbleupon", your_path %>
Upvotes: 2