# Modifying \_form.rhtml after column changes

**URL:** <https://www.ruby-forum.com/t/modifying-form-rhtml-after-column-changes/83024>\
**Category:** Rails\
**Created:** [January 23, 2007, 3:50am UTC](https://www.ruby-forum.com/t/modifying-form-rhtml-after-column-changes/83024 "2007-01-23T03:50:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stan.baptista](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ccd318/32.png) [@stan.baptista](https://www.ruby-forum.com/u/stan.baptista)\
**Post date:** [January 23, 2007, 3:50am UTC](https://www.ruby-forum.com/t/modifying-form-rhtml-after-column-changes/83024/1 "2007-01-23T03:50:40Z")

</div>

For a particular object (“MyObject”), I created initial  
model/view/controller code by first creating a migration file which  
added a table to the database and then running this:

> ruby script/generate model MyObject

Multiple model/view/controller files were created as expected.

However, the next migration file version added columns to the original  
table. After running migrate again, the table was modified but the view  
files such as \_form.rhtml were not.

Is there a way to generate this or is manual modification the only way?

---

<div class="post-metadata">

**Author:** ![stan.baptista](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ccd318/32.png) [@stan.baptista](https://www.ruby-forum.com/u/stan.baptista)\
**Post date:** [January 23, 2007, 4:55am UTC](https://www.ruby-forum.com/t/modifying-form-rhtml-after-column-changes/83024/2 "2007-01-23T04:55:46Z")

</div>

On Jan 23, 1:50 pm, “stan.baptista” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there a way to generate this or is manual modification the only way?  
> I guess you originally ran “script/generate scaffold Whatever”, which  
> spat out the pages/forms/etc for you?

If this is the case, just run scaffold again with the “-f” option.  
This will force it to overwrite existing files.

---

<div class="post-metadata">

**Author:** ![stan.baptista](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ccd318/32.png) [@stan.baptista](https://www.ruby-forum.com/u/stan.baptista)\
**Post date:** [January 24, 2007, 9:02pm UTC](https://www.ruby-forum.com/t/modifying-form-rhtml-after-column-changes/83024/3 "2007-01-24T21:02:32Z")

</div>

> If this is the case, just run scaffold again with the “-f” option. This will force it to overwrite existing files.

That did the trick. Thanks.
