# Nested Resource Generator?

**URL:** <https://www.ruby-forum.com/t/nested-resource-generator/128354>\
**Category:** Rails\
**Created:** [February 7, 2008, 12:29am UTC](https://www.ruby-forum.com/t/nested-resource-generator/128354 "2008-02-07T00:29:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@stephen](https://www.ruby-forum.com/u/stephen)\
**Post date:** [February 7, 2008, 12:29am UTC](https://www.ruby-forum.com/t/nested-resource-generator/128354/1 "2008-02-07T00:29:50Z")

</div>

Thanks in advance for your help!

I’ve found and read a number of blog postings that introduce Rails 2  
concepts, including nested resources. In my newest Rails app, I ran the  
new generate scaffold command for the child resource, and then proceeded  
to make all the manual changes to nest that resource inside of the  
parent resource.

There was a LOT of typing to change this, which brings me to ask: Has  
anyone written a generator that can create a resource already nested  
within another?

---

<div class="post-metadata">

**Author:** ![stephen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@stephen](https://www.ruby-forum.com/u/stephen)\
**Post date:** [February 7, 2008, 4:48pm UTC](https://www.ruby-forum.com/t/nested-resource-generator/128354/2 "2008-02-07T16:48:55Z")

</div>

On 2/6/08, Stephen A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> anyone written a generator that can create a resource already nested  
> within another?

It’s not a generator, but have a look at the resource\_controller plugin.

I recently wrote about it on infoq

> **[Rails: Resource\_controller Plugin Puts Controllers on a Diet](https://www.infoq.com/news/2008/01/rails-resource-controller/)**
>
> Rails 2.0's REST support is useful but it could be less verbose and more helpful when it comes to nested resources. A Rails plugin called resource\_controller helps out by taking the tedious work out of REST controllers. We take a look at the problem...

–  
Rick DeNatale

My blog on Ruby  
[http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)
