This project is archived and is in readonly mode.
defaults routes for namespaces
Reported by Lori Holden | September 11th, 2008 @ 03:17 PM | in 3.x
Namespace support in routes is a little lacking, and if we want to support any form of defaults for our namespace, we have to rely on whatever default route we have setup.
This patch adds support for defaults within namespaces.
The following example now works:
map.namespace 'api' do |api|
api.connect ':controller/:action/:id'
end
urls like: /api/product/list
will now match to the
api's default route.
Comments and changes to this ticket
-
Pratik December 20th, 2008 @ 05:19 PM
- Assigned user set to Michael Koziarski
- State changed from new to incomplete
Hey Lori,
The patch doesn't apply clean anymore. Could you please upload a new patch against the latest edge ?
The feature seem reasonable to me.
-
Neeraj Singh July 1st, 2010 @ 04:23 AM
- Assigned user changed from Michael Koziarski to Andrew White
- Importance changed from to
This is an old ticket. Since then a lot has changed in routing.
Assigning it to Andrew to get his perspective.
-
Andrew White July 1st, 2010 @ 06:43 AM
- State changed from incomplete to resolved
Well, I wouldn't recommend adding a route like this but it does work now:
namespace :api do match '/(:controller/(:action/(:id)))' end
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>