This project is archived and is in readonly mode.
Accept arrays of symbols as values for collection/member actions of resources
Reported by Brennan Dunn | June 13th, 2008 @ 03:42 PM
This will allow the values of collection/member hashes within a resource definition to be arrays of symbols. This is an alternative to supplying :any if a particular action needs, for instance, to be able to respond to a GET or POST request.
map.resources :messages, :collection => { :search => [:get, :post] }
Comments and changes to this ticket
-
Gaius Centus Novus June 13th, 2008 @ 05:21 PM
This version only supports Resources; the solution should go deeper.
-1 as is
+1 for a version that allows non-resource multiple methods (see routes_with_method_array.diff)
-
Ken Collins June 14th, 2008 @ 07:21 PM
- 1 For anything that gives me the ability to use an array of methods. The [:get,:post] is a great example of a simple post back convention. I experienced this pain the other day while moving 1.2.6 app to resource based routes. So as far as I'm concerned the big help would be in resources but yes, I love the idea of having it in app route definitions.
-
Jeremy Kemper June 16th, 2008 @ 12:25 PM
- Milestone cleared.
- State changed from new to open
- Assigned user set to Jeremy Kemper
-
Jeremy Kemper August 28th, 2008 @ 07:56 AM
- Tag set to actionpack, patch, routing, tested
Looks good. Could you rebase against master?
-
Brennan Dunn August 28th, 2008 @ 12:57 PM
Jeremy, attached is both my original patch and Gaius' reworked for master.
-
Repository August 28th, 2008 @ 08:38 PM
- State changed from open to resolved
(from [9cc8c0a0a18163fb6ae0f66b2513c902d19459dc]) Routes may be restricted to lists of HTTP methods instead of a single method or :any.
[#407 state:resolved]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 407 Accept arrays of symbols as values for collection/member actions of resources [#407 state:resolved]