Question about routing polymorphic associations, especially

I have a question regarding edge rails. The new routes syntax is:

map.resources :blog, :has_many => :posts.

Now my question is how would I further specify the association? I
want :posts to ‘has_many :comments’.

But you can’t do:

map.resources :blog, :has_many => :posts(:has_many => :comments)

You can tell what I mean.

I don’t think it makes sense to do map.resources :posts, :has_many
=> :comments because the whole point of nesting posts is so you can’t
get it by itself. So how do I further nest it?

I tried something like this:

map.resources :shows do |shows|
shows.resources :has_many => :episodes do |episode|
episode.resources :has_many => :comments
end
end

and did rake routes but I didn’t see anything like /shows/:id/
episodes/:id/comments/new

Help would be greatly appreciated, thanks.

Hi, afaik, if you want to use that syntax, rails edge endorses
(enforces?) the notion that resources need not (should not) be nested
more than one level deep in the url, because more is redundant. When
you say /blog/12/posts/3/comments the blog_id is know from the @post
record. Thus, /posts/3/comments is sufficient, and all that is
supported.