This project is archived and is in readonly mode.

#1727 ✓resolved
Stefan Tilkov

Routing should support HTTP OPTIONS

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

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).

Comments and changes to this ticket

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>

Attachments

Referenced by

Pages