title: Best Practice Mongoid:NestedResources
body: <p>I'm starting off with a small Rails3:MongoDB:Mongoid project and came along some questions that's nature is more architectural. </p>
  
  <p>When to use nested resources, and how deep to nest? </p>
  
  <p>I'm not a friend of nested routes at all, but they become handy if not stacked deeper than 2 resources and document oriented databases like MongoDB seem to be a perfect target for nesting at all since documents itself are nested. </p>
  
  <p>So my first question was: Should I use nested routes in case of a references_many &lt;=> referenced_in association? </p>
  
  <p>I tried, and since ActiveRecord's "build" is not existant, the whole controller stuff brake down to something that looked much nicer without nesting at all and doing all the stuff manually. </p>
  
  <p>Am I wrong? Should I nest the routes of such associations too? </p>
  
  <p>After that I came to my first embedded documents, and argued myself: Hey, this begs for nesting the routes. Some iterations later I ended up with 4 instead of 2 documents, every embedded in one of the others. So nesting the routes led to URL's I did'nt really like. </p>
  
  <p>So the question to the already MongoDB-experienced user is: should I nest? And if yes, under what circumstanced and how deep? </p>
  
  <p>Greets
  J. </p>