Browse files

Add shallow routing option to new router [#3765 status:committed]

Signed-off-by: David Heinemeier Hansson <>
  • Loading branch information...
1 parent 7240a96 commit 6db9558416cf2133adacbe1634f28c25bfe618d6 @pixeltrix pixeltrix committed with dhh Jun 10, 2010
Showing with 383 additions and 156 deletions.
  1. +10 −0 actionpack/CHANGELOG
  2. +248 −156 actionpack/lib/action_dispatch/routing/mapper.rb
  3. +125 −0 actionpack/test/dispatch/routing_test.rb
@@ -1,5 +1,15 @@
*Rails 3.0.0 [Release Candidate] (unreleased)*
+* Add shallow routes back to the new router [Diego Carrion]
aptinio Jun 18, 2010

It seems credit should go to Andrew White (pixeltrix)

jeremy Jun 18, 2010 Member

Indeed -- updated!

plentz Jul 27, 2010 Contributor

jeremy, I think that it was right before your change:

+ resources :posts do
+ shallow do
+ resources :comments
+ end
+ end
+ You can now use comment_path for /comments/1 instead of post_comment_path for /posts/1/comments/1.
* Add support for multi-subdomain session by setting cookie host in session cookie so you can share session between, and #4818 [Guillermo Álvarez]
* Removed textilize, textilize_without_paragraph and markdown helpers. [Santiago Pastorino]
Oops, something went wrong.

7 comments on commit 6db9558




Nice indeed. An earlier version of this patch was checked in and then backed out recently, so I hope it stays in this time.






Are there no docs for this addition? I'm not finding anything in the api docs or the rails guide.

fxn commented on 6db9558 Nov 21, 2010

Should be in API (mapper.rb) and guides (routing.textile), but I don't think it is covered.

plentz commented on 6db9558 May 20, 2011

related to issue #1167

Please sign in to comment.