| Article: |
Rolling with Ruby on Rails | |
| Subject: | Scaffold command | |
| Date: | 2006-03-22 14:21:30 | |
| From: | claudiaG | |
|
I am working on Mac OS X. I did a tutorial for Ruby on Rails specifically for Mac OS X. In it, we typed the following command after creating the tables in the database to get the basic CRUD functions for the web interface: script/generate scaffold <model name> <controller name>
|
||
Showing messages 1 through 3 of 3.
-
Scaffold command
2006-03-22 20:04:51 Curt Hibbs |
[View]
-
Scaffold command
2006-03-23 14:31:31 claudiaG [View]
Thanks for replying. So just to clarify, if I initally run the scaffold command line and modify the list, edit, etc... files. Then I change a table on the database and need to run the scaffold command line again. The command line will generate new basic CRUD files and so I would lose all my changes to the edit, list, etc.. files? or will running the command line a second time just modify the files?
thanks for your time. -
Scaffold command
2006-03-23 14:32:51 Curt Hibbs |
[View]
You would lose your changes.



Running the scaffold command on the command line physically creates the files containing the scaffold code. The nice thing about this is tat you can see the code and even modify it. But if you make DB changes, that you want to see you would have to rerun the scaffold command and regenerate the files.