diff options
author | Mike Gunderloy <MikeG1@larkfarm.com> | 2008-11-09 06:45:34 -0600 |
---|---|---|
committer | Mike Gunderloy <MikeG1@larkfarm.com> | 2008-11-09 06:45:34 -0600 |
commit | 119a6397f5edb5732c0dfcb2eb750649065004bd (patch) | |
tree | 0ba5a3aa0bace250eecb1f64a1344576d516676a /railties/doc/guides/source | |
parent | 759ace7e87eb7b3cf6614b85db96913813d71a39 (diff) | |
download | rails-119a6397f5edb5732c0dfcb2eb750649065004bd.tar.gz rails-119a6397f5edb5732c0dfcb2eb750649065004bd.tar.bz2 rails-119a6397f5edb5732c0dfcb2eb750649065004bd.zip |
Fix major gaffe about shallow routes in routing guide & release notes, regen guides html
Diffstat (limited to 'railties/doc/guides/source')
-rw-r--r-- | railties/doc/guides/source/2_2_release_notes.txt | 2 | ||||
-rw-r--r-- | railties/doc/guides/source/routing_outside_in.txt | 12 |
2 files changed, 2 insertions, 12 deletions
diff --git a/railties/doc/guides/source/2_2_release_notes.txt b/railties/doc/guides/source/2_2_release_notes.txt index 715648b95e..ff285b85cd 100644 --- a/railties/doc/guides/source/2_2_release_notes.txt +++ b/railties/doc/guides/source/2_2_release_notes.txt @@ -212,7 +212,7 @@ On the controller side, there are a couple of changes that will help tidy up you === Shallow Route Nesting -Shallow route nesting provides a solution to the well-known difficulty of using deeply-nested resources. With shallow nesting, you need only supply enough information to uniquely identify the resource that you want to work with - but you _can_ supply more information. +Shallow route nesting provides a solution to the well-known difficulty of using deeply-nested resources. With shallow nesting, you need only supply enough information to uniquely identify the resource that you want to work with. [source, ruby] ------------------------------------------------------- diff --git a/railties/doc/guides/source/routing_outside_in.txt b/railties/doc/guides/source/routing_outside_in.txt index 6d127973b0..a9ebb7bc36 100644 --- a/railties/doc/guides/source/routing_outside_in.txt +++ b/railties/doc/guides/source/routing_outside_in.txt @@ -535,17 +535,7 @@ This will enable recognition of (among others) these routes: /photos/3 ==> photo_path(3) ------------------------------------------------------- -With shallow nesting, you need only supply enough information to uniquely identify the resource that you want to work with - but you _can_ supply more information. All of the nested routes continue to work, just as they would without shallow nesting, but less-deeply nested routes (even direct routes) work as well. So, with the declaration above, all of these routes refer to the same resource: - -------------------------------------------------------- -/publishers/1/magazines/2/photos/3 ==> publisher_magazine_photo_path(1,2,3) -/magazines/2/photos/3 ==> magazine_photo_path(2,3) -/photos/3 ==> photo_path(3) -------------------------------------------------------- - -Shallow nesting gives you the flexibility to use the shorter direct routes when you like, while still preserving the longer nested routes for times when they add code clarity. - -If you like, you can combine shallow nesting with the +:has_one+ and +:has_many+ options: +With shallow nesting, you need only supply enough information to uniquely identify the resource that you want to work with. If you like, you can combine shallow nesting with the +:has_one+ and +:has_many+ options: [source, ruby] ------------------------------------------------------- |