# Changing Scaffold

**URL:** <https://www.ruby-forum.com/t/changing-scaffold/67812>\
**Category:** Rails\
**Created:** [September 6, 2006, 11:43pm UTC](https://www.ruby-forum.com/t/changing-scaffold/67812 "2006-09-06T23:43:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![acras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@acras](https://www.ruby-forum.com/u/acras)\
**Post date:** [September 6, 2006, 11:43pm UTC](https://www.ruby-forum.com/t/changing-scaffold/67812/1 "2006-09-06T23:43:12Z")

</div>

Hi,

I am starting a project in rails and I wish to change scaffolding.  
I’ve already done some changes like prepare all texts for locale. Now  
I am wishing to change the way it generates the \_form partial. Could  
someone give some guideline so I can study such thing?  
I saw “template\_for\_inclusion” in form.rhtml but couldn’t find out  
how to change it.  
Being more specific, I would like to change scaffold to create  
lookup combo boxes to simple tables.

An example:

I have table countries and states. States has a country\_id field When  
I scaffold table states I would like it to generate a combo with  
countries.

Thank you for your help.

–  
Ricardo A.  
removed\_email\_address@domain.invalid  
Acras Desenvolvimento de Sistemas  
+55+41-3232-6404  
[www.acras.net](http://www.acras.net)

---

<div class="post-metadata">

**Author:** ![acras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@acras](https://www.ruby-forum.com/u/acras)\
**Post date:** [September 8, 2006, 3:16pm UTC](https://www.ruby-forum.com/t/changing-scaffold/67812/2 "2006-09-08T15:16:11Z")

</div>

On 9/6/06, Ricardo A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have table countries and states. States has a country\_id field When  
> I scaffold table states I would like it to generate a combo with  
> countries.
> 
> Thank you for your help.

If you use script/generate to generate the scaffolding for your  
project, it outputs the code to your application directory, and you  
can edit them there.

> Ricardo A.  
> removed\_email\_address@domain.invalid

Sincerely,

Tom L.  
[http://AllTom.com/](http://AllTom.com/)  
[http://GadgetLife.org/](http://GadgetLife.org/)
