X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=app%2Fviews%2Fstore%2Findex.html.erb;h=f3e7ebedff34db7d48abeaa01929ff076ef094ae;hb=f9d45398338f9e5b2dabd768fcd793c4f81934f2;hp=fff01dffcb953c92a0c8ebd97a8042ef28c58ebb;hpb=aff195f08c5fc2b8db74058b34720164148cfb4e;p=depot.git diff --git a/app/views/store/index.html.erb b/app/views/store/index.html.erb index fff01df..f3e7ebe 100644 --- a/app/views/store/index.html.erb +++ b/app/views/store/index.html.erb @@ -2,8 +2,10 @@ <% for product in @products -%>
- <%= link_to image_tag(product.image_url), {:action => "add_to_cart", :id => product}, :method => "post" %> -

<%= link_to h(product.title), {:action => "add_to_cart", :id => product}, :method => "post" %>

+ <% form_remote_tag :url => {:action => 'add_to_cart', :id => product} do %> + <%= image_submit_tag(product.image_url) %> + <% end %> +

<%= h(product.title) %>

<%= product.description %>
<%= number_to_currency product.price, :unit => "£" %>