I’m getting a RoutingError for a member route I can’t figure out. I’m
posting a simple form that has a submit button as a confirmation step.
Here’s the route:
routes.rb
resources :orders do
post ‘confirm’, :on => :member
end
- “rake routes” shows it’s there:
confirm_order POST /orders/:id/confirm(.:format)
{:action=>“confirm”, :controller=>“orders”}
- Controller Orders defines confirm
- HTML output shows the form is correctly set to post with action “/
orders/3/confirm” - Request header on the Routing Error page shows “POST /orders/3/
confirm HTTP/1.1” - My functional test passes: “post :confirm, :id =>
@order.to_param, :order => @order.attributes” - All other routes in routes.rb are disabled except the above
Everything seems to be correct but it’s not working:
No route matches “/orders/3/confirm”
If I change the request method on the route to “get” and simply view
in the browser it works. Help?