This project is archived and is in readonly mode.
Changeset [83c6ba18899a9f797d79726ca0078bdf618ec3d4] by Pratik Naik
Revision 83c6ba18899a9f797d79726ca0078bdf618ec3d4,
committed 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...
3 changed files
-
M
actionpack/CHANGELOG -
M
actionpack/lib/action_controller/resources.rb -
M
actionpack/test/controller/resources_test.rb