# Routes: has\_many vs. nested

**URL:** <https://www.ruby-forum.com/t/routes-has-many-vs-nested/148387>\
**Category:** Rails\
**Created:** [September 12, 2008, 1:03pm UTC](https://www.ruby-forum.com/t/routes-has-many-vs-nested/148387 "2008-09-12T13:03:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gerold\_BSSSShler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/6de8d8/32.png) [@Gerold\_BSSSShler](https://www.ruby-forum.com/u/Gerold_BSSSShler)\
**Post date:** [September 12, 2008, 1:03pm UTC](https://www.ruby-forum.com/t/routes-has-many-vs-nested/148387/1 "2008-09-12T13:03:15Z")

</div>

hello

i was just wondering what the diference between

map.resources :posts, :has\_one =\> :author, :has\_many =\>  
[:comments, :trackbacks]

and

map.resources :posts do |posts|  
posts.resource :author  
posts.resources :comments  
posts.resources :trackbacks  
end

is.

which one should i use? is there a difference at all?

thanks!

gerold
