This project is archived and is in readonly mode.

#5663 open
BicycleRepairMan

Route generation error with :defaults and :via options

Reported by BicycleRepairMan | September 19th, 2010 @ 04:14 PM | in 3.0.6

There seems to be a problem when we use the :defaults and :via options simultaneously to match a route. The attached unit test should not fail! Also if the routes.rb file looks like

RouteBug::Application.routes.draw do
  match '/error' => "bug#index", :defaults => {:format => "jpg"}, :via => :get
end

then

RAILS_ENV=env rails runner 'RouteBug::Application.routes.generate :controller => :bug'
raises an error in test and production mode, but not in development mode.

I tested this with ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux] compiled from source and the ubuntu lucid ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux].

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

Pages