On Nov 23, 4:18 pm, Dave Aronson <[email protected]> wrote: > On Wed, Nov 23, 2011 at 16:04, Everaldo Gomes <[email protected]> > wrote: > > Try this: > > resources :users > > resources :decisions > > resources :alternatives > > resources :factors > > That's how I've already got the app working; the nested version was > something I wanted to try since it seemed more in tune with REST. See > my post under the thread "resource nesting for spreadsheet-like app?". > > In this thread here, I'm just looking for opinions on whether nesting > things under users is a good or bad thing, regardless of other > nesting. > > Thanks, > Dave > > -- > LOOKING FOR WORK! What: Ruby (on/off Rails), Python, other modern languages. > Where: Northern Virginia, Washington DC (near Orange Line), and remote work. > See: davearonson.com (main) * codosaur.us (code) * dare2xl.com (excellence). > Specialization is for insects. (Heinlein) - Have Pun, Will Babble! (Aronson)
if you're using a controller that NEEDS properties from a parent, use nested routes. if you're using a controller that can assume the parent, or it can be contrived, don't nest. example: users controller, using devise for authentication, giving you the current_users variable private information singleton controller for data being stored only for the current user, and not to be seen by other users contact information controller, which stores personal contact information, some of which can be seen by all users, depending on privacy settings resources :users do resources :contacts end resources :user_confidential that's how I approach it - however there is no right or wrong way to do it. just remember routes provide information to a controller, and aren't necessarily a representation of models (though that's a great place to start). hope that helps. -- 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.

