Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Routing should support HTTP OPTIONS

#1727

I can see no reason why a route like this should not be supported, as OPTIONS is a meaningful and useful verb:

map.connect '/orders/', :controller => "orders", :action => 'options', :conditions => { :method => :options }

but it raises an exception:

validate_route_conditions': Invalid HTTP method specified in route conditions

An easy fix seems to be to change ActionController::Routing::HTTP_METHODS to include :options (as in fact the almost identical ActionController::Request::HTTP_METHODS does).

Reported by Stefan Tilkov · January 10th, 2009 @ 07:01 PM

State: resolved
Milestone: none
Assigned to: josh josh
Importance: none

Activity

  1. CancelProfileIsBroken
    CancelProfileIsBroken
    • Assigned user set to josh
    • Milestone cleared.

    Here's the patch + test. Any reason not to support this?

    March 8th, 2009 @ 12:32 PM

  2. Repository
    Repository
    • State changed from new to resolved
    • Tag set to 2.3, patch, routing

    (from [5e0f6214d2421a4931c85ee6a239158c69e57b65]) Support OPTIONS verb in route conditions [#1727 Routing should support HTTP OPTIONS state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

    March 8th, 2009 @ 12:38 PM