I'm a newbie, running through a rails tutorial. I'm a bit stuck on using the img_submit_tag.

<% @products.each do |product| -%>   <div class="entry">     <%= link_to image_tag(product.image_url, :border =>0), :action => 'add_to_cart', :id => product %>     <h3><%=h product.title %></h3>     <%= product.description %>

The <%= link_to image_tag(product.image_url, :border =>0), :action => 'add_to_cart', :id => using the product.image_url as a source and I'd like to know how I can pass the path to the img_submit_tag. Thanks, I hope I'm not too confusing in my question

Hi,    Take normal form and define your controller & action there as url. Instade of normal submit_tag use image_submit_tag.

eg. <% form_for :url => {:action => 'add_to_cart', :id => x} do |f| %> <%= image_submit_tag("agree.png") %> <% end %>