Permalink
Browse files

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

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
  • 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
View
@@ -1,5 +1,15 @@
*Rails 3.0.0 [Release Candidate] (unreleased)*
+* Add shallow routes back to the new router [Diego Carrion]
@aptinio
aptinio Jun 18, 2010

It seems credit should go to Andrew White (pixeltrix)

@jeremy
jeremy Jun 18, 2010 Member

Indeed -- updated!

@plentz
plentz Jul 27, 2010 Contributor

jeremy, I think that it was right before your change:
http://github.com/rails/rails/commit/67a60ee314f53abcde78f8ecd2a1f7c9ef8264e1

+
+ 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 www.example.com, example.com and user.example.com. #4818 [Guillermo Álvarez]
* Removed textilize, textilize_without_paragraph and markdown helpers. [Santiago Pastorino]
Oops, something went wrong.

7 comments on commit 6db9558

@yaroslav
Contributor

Nice!

@wincent
Contributor

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

@m3talsmith

Yeah!

@theturtle32

Sweet!

@akaspick
Contributor

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

@fxn
Member
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
Contributor
plentz commented on 6db9558 May 20, 2011

related to issue #1167

Please sign in to comment.