I don't see a way to create a single URL in a collection and then have
routing dispatch to the appropriate method based on the  HTTP method.

map.resources :packages, :collection=>{ :search=>:get }

Gets me half way there, but I can see a way to say that I want the
POST to go to the do_search method.

Furthermore

map.resources :packages, :collection=>
{ :search=>:get, :do_search=>:post }

results in a ActionController::MethodNotAllowed for POSTs to /packages/
do_search.

`rake routes`  affirms that this should be accepted:

do_search_packages POST   /packages/do_search
{:action=>"do_search", :controller=>"packages"}

How can I solve either of these?
Thanks


--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to