/ Published in: Ruby

Adds a button in view, which triggers a method.
"Empty cart" is the button name
empty_cart is the method name
"Empty cart" is the button name
empty_cart is the method name
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<%= button_to "Empty cart", :action => :empty_cart %>
Comments
