projects
/
depot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Finished iteration D.3 in chapter 9
[depot.git]
/
app
/
views
/
store
/
index.html.erb
diff --git
a/app/views/store/index.html.erb
b/app/views/store/index.html.erb
index c65b69b114087113b282c84c086517e72c043c61..fff01dffcb953c92a0c8ebd97a8042ef28c58ebb 100644
(file)
--- a/
app/views/store/index.html.erb
+++ b/
app/views/store/index.html.erb
@@
-7,7
+7,9
@@
<%= product.description %>
<div class="price-line">
<span class="price"><%= number_to_currency product.price, :unit => "£" %></span>
<%= product.description %>
<div class="price-line">
<span class="price"><%= number_to_currency product.price, :unit => "£" %></span>
- <%= button_to "Add to cart", :action => "add_to_cart", :id => product %>
+ <% form_remote_tag :url => {:action => 'add_to_cart', :id => product} do %>
+ <%= submit_tag "Add to cart" %>
+ <% end %>
</div>
</div>
<% end %>
</div>
</div>
<% end %>