Posted By

wackimonki on 02/26/07


rails button rubyonrails

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Adding Button to View

 / Published in: Ruby

Adds a button in view, which triggers a method.

"Empty cart" is the button name empty_cart is the method name

  1. <%= button_to "Empty cart", :action => :empty_cart %>

Report this snippet  

You need to login to post a comment.