# Modifying \_form.rhtml after column changes

**URL:** <https://discuss.rubyonrails.org/t/modifying-form-rhtml-after-column-changes/7623>\
**Category:** rubyonrails-talk\
**Created:** [January 23, 2007, 2:50am UTC](https://discuss.rubyonrails.org/t/modifying-form-rhtml-after-column-changes/7623 "2007-01-23T02:50:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stan\_Baptista](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@Stan\_Baptista](https://discuss.rubyonrails.org/u/Stan_Baptista)\
**Post date:** [January 23, 2007, 2:50am UTC](https://discuss.rubyonrails.org/t/modifying-form-rhtml-after-column-changes/7623/1 "2007-01-23T02:50:19Z")

</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:** ![askegg](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@askegg](https://discuss.rubyonrails.org/u/askegg)\
**Post date:** [January 23, 2007, 3:55am UTC](https://discuss.rubyonrails.org/t/modifying-form-rhtml-after-column-changes/7623/2 "2007-01-23T03:55:00Z")

</div>

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://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@Stan\_Baptista](https://discuss.rubyonrails.org/u/Stan_Baptista)\
**Post date:** [January 24, 2007, 8:01pm UTC](https://discuss.rubyonrails.org/t/modifying-form-rhtml-after-column-changes/7623/3 "2007-01-24T20:01:59Z")

</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.
