Forum: Ruby on Rails Modifying _form.rhtml after column changes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
stan.baptista (Guest)
on 2007-01-23 04:50
(Received via mailing list)
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?
askegg (Guest)
on 2007-01-23 05:55
(Received via mailing list)
On Jan 23, 1:50 pm, "stan.baptista" <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.
stan.baptista (Guest)
on 2007-01-24 22:02
(Received via mailing list)
> 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.
This topic is locked and can not be replied to.