Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add a test to show use case for routing priority #1257
This test shows a (currently failing) use case for routing priority as it worked in 0.10 but seems to be broken in 0.11.
In my app I have a bunch of urls that related to 'pages' the content of which is stored in a DB. These need to be accessed at /:page_name . I also have some controllers with more 'hard coded' pages (shopping cart/contact form, etc.) The problem is the index route in the app.rb should be the last possible route after all the controllers. As it stands it is about the 3rd route... before all of the controllers and thus catches everything resembling a controller.
Great, thanks for this. Will there be another solution for something like this in 1.0? It seems like a fairly common need in routing - some way to set order of routes. With routes in Padrino occurring in multiple files it seems difficult to control the order as it is now.