I have a list view in my RoR web app. The view is a result of a scaffold operation.
I want to add a button that will refresh the page. I prefer not to use javascript for this one, is there another way?
Creating a button via button_to or form_tag ends up adding a new blank row in the database when it is clicked.
Thanks!
Shay.
I am going to assume that you are using standard RESTful routes and as a result your form/button_to calls are POSTing to you controller and therefore executing your create action. If that is the case then either of the options you tried should work, but just make sure you are setting the method to “get” so the request is routed to the index action correctly