diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-08-30 14:58:16 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-08-30 15:20:20 +0100 |
commit | 83c6ba18899a9f797d79726ca0078bdf618ec3d4 (patch) | |
tree | 6a5d99003c58f1eda9477e0ffee197227705f09a /activeresource/lib | |
parent | be4ae1f5264d6593e9dec479af4503c4bde2877e (diff) | |
download | rails-83c6ba18899a9f797d79726ca0078bdf618ec3d4.tar.gz rails-83c6ba18899a9f797d79726ca0078bdf618ec3d4.tar.bz2 rails-83c6ba18899a9f797d79726ca0078bdf618ec3d4.zip |
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.
Diffstat (limited to 'activeresource/lib')
0 files changed, 0 insertions, 0 deletions