This project is archived and is in readonly mode.
Rack::Mount blows up if passed invalid constraints
Reported by Andrew White | June 28th, 2010 @ 01:01 AM | in 3.0.2
If you use scope to specify some constraints that aren't used within a route inside that scope then Rack::Mount raises an exception. The attached patch removes any constraints that are not in the list segment keys or is not a public instance method on the request class.
Comments and changes to this ticket
-
Andrew White June 28th, 2010 @ 01:03 AM
An example routes.rb file that shows this error is:
scope :constraints => { :id => /\d+/ } do resources :products resources :images end
-
Andrew White June 28th, 2010 @ 01:38 AM
Updated patch to use only instance variables and pass in RouteSet as first parameter.
-
Repository June 28th, 2010 @ 11:31 AM
- State changed from open to resolved
(from [19ccd4628c1ab4aebc00dc8d480d6cbf1688a312]) Remove invalid conditions from route [#4989 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/19ccd4628c1ab4aebc00dc8d480d6c...
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>
People watching this ticket
Attachments
Referenced by
- 4989 Rack::Mount blows up if passed invalid constraints (from [19ccd4628c1ab4aebc00dc8d480d6cbf1688a312]) Remove ...