No, I just used the scaffold: product line in the ActiveRecord as
suggested by the book. Do I still need to run the script to generate a
Raghu Murthyemail: [email protected]
----- Original Message ----
From: Jim C. [email protected]
To: Raghu Murthy [email protected]; [email protected]
Sent: Tuesday, July 25, 2006 10:01:12 PM
Subject: Re: [Rails] newbie: Scaffold doesn’t pickup DB changes
On Tue, Jul 25, 2006 at 07:45:55PM -0700, Raghu Murthy wrote:
I’m following along with the depot example in ‘Agile Web D.’ and ran into a problem with Scaffold. I changed the MySQL table structure to add a few columns directly and also tried the migrate script to change the database after I got the initial scaffolding to work. However, I can’t seem to get the new columns to show up and am stumped as to how I can get this to work.
If you used $ script/generate scaffold model, it’ll create a set of
static files for the db, once. It won’t detect any changes.
If you’ve changed the db, re-run the scaffold generator.