This project is archived and is in readonly mode.
Changeset [83c6ba18899a9f797d79726ca0078bdf618ec3d4] by Pratik Naik
August 30th, 2008 @ 03:20 PM
Add support for shallow nesting of routes. [#838 state:resolved]
Adds :shallow option to resource route definition. If true, paths for nested resources which reference a specific member (ie. those with an :id parameter) will not use the parent path prefix or name prefix.
Example :
map.resources :users, :shallow => true do |user| user.resources :posts end
-
GET /users/1/posts (maps to PostsController#index action as usual) named route "user_posts" is added as usual.
-
GET /posts/2 (maps to PostsController#show action as if it were not nested) Additionally, named route "post" is added too. http://github.com/rails/rails/co...
Committed by Pratik Naik
- M actionpack/CHANGELOG
- M actionpack/lib/action_controller/resources.rb
- M actionpack/test/controller/resources_test.rb
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>