Skip to content

Commit

Permalink
自由課題、画像クリックで add_to_cart アクションを呼び出す
Browse files Browse the repository at this point in the history
link_to "innerHTML", { :action => "foo" }, { html_options }
  • Loading branch information
kyanny committed Jan 20, 2010
1 parent 82c48ae commit 3b4e8d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion depot/app/views/store/index.html.erb
Expand Up @@ -2,7 +2,7 @@

<% for product in @products -%>
<div class="entry">
<%= image_tag(product.image_url) %>
<%= link_to image_tag(product.image_url), { :action => "add_to_cart" }, { :method => "post" } %>
<h3><%=h product.title %></h3>
<%= product.description %>
<div class="price-line">
Expand Down

0 comments on commit 3b4e8d6

Please sign in to comment.