Forum: Ruby on Rails Regexp route broken in Rails 2.2.2?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
443a308e12ba2a3082fb6170ca94c2ef?d=identicon&s=25 Ed Wg (ewildgoose)
on 2009-02-04 22:25
(Received via mailing list)
Hi, just upgraded an app from Rails 2.1.0 to 2.2.2 and finding 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...

Thanks

Ed W
This topic is locked and can not be replied to.