# Best Practice for nested resources

**URL:** <https://www.ruby-forum.com/t/best-practice-for-nested-resources/158496>\
**Category:** Rails\
**Created:** [January 23, 2009, 11:10pm UTC](https://www.ruby-forum.com/t/best-practice-for-nested-resources/158496 "2009-01-23T23:10:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neal\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/74df32/32.png) [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Post date:** [January 23, 2009, 11:10pm UTC](https://www.ruby-forum.com/t/best-practice-for-nested-resources/158496/1 "2009-01-23T23:10:39Z")

</div>

Hi all,

I’m writing an app that has a reporting component. All of the reports  
are in a controller called reports\_controller. I’m using REST routes,  
and I’d like to do something like:

/properties/1/myreport

and have it call the myreport action of the reports controller. Is  
there a way to do this? Is this where I would use something like:

map.resources :properties do |property|  
~~something here to reference myreport ???~~  
end

Thanks!

---

<div class="post-metadata">

**Author:** ![Neal\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/74df32/32.png) [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Post date:** [January 24, 2009, 8:17am UTC](https://www.ruby-forum.com/t/best-practice-for-nested-resources/158496/2 "2009-01-24T08:17:47Z")

</div>

You might want to check out resource\_controller

[http://jamesgolick.com/2007/10/19/introducing-resource\_controller-focus-on-what-makes-your-controller-special](http://jamesgolick.com/2007/10/19/introducing-resource_controller-focus-on-what-makes-your-controller-special)
