This project is archived and is in readonly mode.

#4189 ✓resolved
Anthony Green

constraints with resources in routes don't catch regex

Reported by Anthony Green | March 16th, 2010 @ 07:42 AM | in 3.0.2

resources :resource, :constraints => { :id => /regex/ }

doesn't catch the regex and lets the request through to the controller

match 'path/:id' => 'controller#action', :constraints => { :id => /regex/ }

does work

The old :conditions format used to work

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