Where can I find the pre-defined constants for the "head" method? e.g. "return head(:method_not_al

Hi,

Where can I find the pre-defined constants for the “head” method?

e.g. “return head(:method_not_allowed)” => implies
“:method_not_allowed” must come from somewhere

They’re just the underscored names of HTTP statuses as symbols. You
can find a list of http statuses here:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

return head (:method_not_allowed) sends an empty response with HTTP
status 405.

But where is the translation of the symbol to the error code number?

On Feb 12, 5:54 pm, Emery F. [email protected]

On Fri, Feb 12, 2010 at 03:51, greghauptmann [email protected]
wrote:

On Feb 12, 1:28 am, greghauptmann [email protected] wrote:

You received this message because you are subscribed to the Google G. “Ruby on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Rack::Utils::HTTP_STATUS_CODES

(At least, that’s what Rails is using at master. Not sure about 2.3.x)