# This will be default use POST method which in this context be sent as a create resource
<% form_for @course do |f| %>
...
<% end %>
<%= button_to 'Cancel', courses_path %>
# Specify GET method explicitly so it will call index resource instead
<%= button_to 'Cancel', courses_path, :method => :get %>
Showing posts with label button_to. Show all posts
Showing posts with label button_to. Show all posts
Tuesday, October 6, 2009
Be careful with button_to in RESTful routes
Subscribe to:
Posts (Atom)