501 and 405 slightly inaccurate?

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

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

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