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

1) "rake routes" shows it's there:

confirm_order POST   /orders/:id/confirm(.:format)
{:action=>"confirm", :controller=>"orders"}

2) Controller Orders defines confirm
3) HTML output shows the form is correctly set to post with action "/
orders/3/confirm"
4) Request header on the Routing Error page shows "POST /orders/3/
confirm HTTP/1.1"
5) My functional test passes:  "post :confirm, :id =>
@order.to_param, :order => @order.attributes"
6) 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? :)

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to