oh yeah then what if i wanted--

a has many b, and b has many c, and c has many d

how would i do that in a route? like multiple stacked layers, how
would i write that in my routes.rb?

On Apr 8, 11:18 am, bseanvt <[email protected]> wrote:
> when I have more than one nested 'has_many' resource, i think about
> creating a 
> namespace...http://seanbehan.com/ruby-on-rails/nesting-resources-in-rails-routes-...
> ...this keeps your other controllers (forums, pages) clean and restful
>
> On Apr 7, 8:31 pm,DavidZhu<[email protected]> wrote:
>
> > Hey,
>
> > i have- map.resources :courses, :has_many => :pages
>
> > now what if i wanted for courses to has_many => :forums as well?
>
> > can i just do map.resources :courses, :has_many => :pages, :forums
>
> > ?? because that doesn't work. whats the syntax for- has many blank AND
> > blank..
>
> > lol reall noobie i know, but i just don't know how to do it.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to