advanced code snippet search
wackimonki on 02/26/07
rails button rubyonrails
1 person have marked this snippet as a favorite
Adds a button in view, which triggers a method.
"Empty cart" is the button name
empty_cart is the method name
<%= button_to "Empty cart", :action => :empty_cart %>
Report this snippet
You need to login to post a comment.