> My app currently is working but I'm a little OCD about conforming to
> best practices so I'd like to get a few things cleared up.
> 
> 1. I have quite a lot of before_filters to restrict certain parts of
> the site to some users, and a lot of my controllers use very similar
> authorization code. Here's an example:

You might look into a gem like cancan or something similar to handle this for 
you... 

> Regarding nested resources, is it bad to have more than 2 levels? My
> deepest level is 3 and it's a bother to manage it all, but if I
> separate them then I'd still have to get the IDs of their "parents"
> anyways by passing them in URLs or something.

Why can't you get the parent from the child itself?

Parent has many Children...

c = Children.find(123)
c.parent => instance of Parent

?

-philip

-- 
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