This project is archived and is in readonly mode.

#4806 ✓committed
Andrew Bloomgarden

Regexp ignore-case option in routes breaks params

Reported by Andrew Bloomgarden | June 9th, 2010 @ 09:07 AM | in 3.0.2

(see attached for an example app with this code)

If you have a blank app with the following controller:

class TestController < ApplicationController
  def index
    render :text => params.inspect
  end
end

and the following in routes.rb:

get "/:foo/:bar" => 'test#index', :foo => /first/i, :bar => /second/

when going to /first/second, the expected response would have both the :foo and :bar components in it, but it actually is the following:

{"action"=>"index", "foo"=>"first", "controller"=>"test"}

The second component somehow gets swallowed. I'm not sure exactly what's going on, so hopefully we can figure this out.

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>

Pages