Nested Resources and with_scope

Heylo all…
Basically nested resources in rails 2.0 are great, but I’m trying to
do the thin controller fat model stuff and I’m trying to build a model
that knows what the resource tree is…
Ie
@document = Document.find(:all) returns whatever you would expect at
that part of the tree…

/documents #returns all documents
/category/1/documents #returns category 1 documents

I’m pretty sure it’s got to do with with_scope, but how do I apply it
to the model?

I’ve been reading that around_filter and with_scope is bad, but that
seems the best way to do it…

Thanks in advance,
-Adam

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs