On Jan 12, 12:07 am, AJ ONeal
<Alvin.ON...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Since Rails routes know which methods are implemented per controller, why
> does "Allows" always contain these items?
> Allows => "POST, GET, PUT, DELETE"
>
> Shouldn''t the list be built by polling a method? Something like:
> my_controller.responds_to? :put
>
If you are using restful routes then rails could probably work out
from the routing info what methods are supporter for a given URI,
although it doesn''t know in the more general case.
Fred> I would think that 501 (server related) would be better for a method which
> will be implemented in the future and that 405 (access related) should
> signify that the option was considered and decided against.
>
> AJ ONeal
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.