Re: Image_tag problem

Stephen Bartholomew
Thu, 28 Sep 2006 10:20:08 -0000

> The code snippt I specifically have a problem with is
>
> <%= link_to image_tag(''<%= product.image_url
%>''),   :action =>
> :add_to_cart, :id => product  %>
>
This code looks a bit wrong...  You don''t need to use the output tags
(<%= %>) in that string.  In fact, it shouldn''t be a string at
all in
this case.  This should work fine:

<%= link_to image_tag(product.image_url), :action => :add_to_cart, :id
=> product  %>

Hope that helps,

Steve