This project is archived and is in readonly mode.

#1887 ✓committed

Regexp routing problems in 2.2.2 since 2.1.0

Reported by Wildgoose | February 5th, 2009 @ 06:06 PM

Hi, just upgraded an app from Rails 2.1.0 to 2.2.2 and finding some of my routes stopped working

URL which doesn't match is: http://blah/blog/auth/login

Route is: map.connect 'blog/:controller/:action/:id', :requirements => {:controller => /(auth|asdf)/}

In fact, neither does this match: map.connect 'blog/:controller/:action/:id', :requirements => {:controller => /(auth)/}

But this does: map.connect 'blog/:controller/:action/:id', :requirements => {:controller => /auth/}

So the problem seems to be that "( )" syntax is breaking the regexp parsing. Curiously though the regexp does work for link generation, it's only route recognition which breaks

Can anyone give me a quick workaround for this, quite a lot or routes to alter otherwise...

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=""></a>

People watching this ticket

Referenced by