Wednesday 15 January 2014

html - Issue with link_to method in rails 3.2 -


We are upgrading the railway from 2.3.5 to 3.2.1. While upgrading, we are having trouble with link_ method. We have the following code snippets.

link_to (name, path_options, html_options, * params)

Here is the name: & lt; Span class = 'bark_link_tag' & gt; & Lt; Img alt = "Post this blog to Stumbleupon" src = "/ images / png / stumble.png" /> gt; & Amp; Nbsp; Stumbleupon & lt; / Span & gt;

But while rendering it displays the above named value rather than displaying the image in the UI.

Can you please help us with this ASAP?

You can use image_tag in link_to,

  & Lt;% = link_to image_tag ("images / png / stumble .png",: alt = & gt; "post this blog in stumbleupone",: class => "bmark_link_tag") + "stumbleupon", your_path % & Gt;    

No comments:

Post a Comment