# Nested Resources and with\_scope

**URL:** <https://www.ruby-forum.com/t/nested-resources-and-with-scope/123311>\
**Category:** Rails\
**Created:** [December 16, 2007, 7:51am UTC](https://www.ruby-forum.com/t/nested-resources-and-with-scope/123311 "2007-12-16T07:51:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asetzler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac91a4/32.png) [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Post date:** [December 16, 2007, 7:51am UTC](https://www.ruby-forum.com/t/nested-resources-and-with-scope/123311/1 "2007-12-16T07:51:08Z")

</div>

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
