Can't find the answer to this. My old message received no responses
(subject was messed up).
Is it possible to create routes that have the same URL yet map to a
different action based on the HTTP method (or pseudo method) like a
Rails' resource?
I'd like to use /foo/purge for both actions, and have the appropriate
controller method called based on the HTTP request's method -like /foo
does for the create and index methods, amongst others.
I put parentheses in so the wrapping doesn't kill the syntax.
Since there is an implied precedence based on appearance, if the map.resources(:foo) comes first, GET /foo/purge, looks like you want to show the Foo with id='purge'. (I'm not sure, but a POST /foo/purge might do the FooController#purge_them in either case).