Hello all!
I would like to get an admin interface for my shopping cart app
up and running using rails. The admin interface will be used for
Customers, Products, Catggories, ect management. My db schema reflects
the above mention tables names. The question I have is could I use the
scaffold feature this way:

(eg)—ruby script/generate scaffold Products Customers Categories


Hi, Patrick,

you should make sure that your database scheme uses the other
that rails assumes. If it does not do a search on the wiki for legacy
and build your models upon that.

The main other convention that your legacy schema often won’t fit is the
name of the foreign keys which should be in your case customer_id,
product_id and category_id. But you could of course use scaffolding to
up some stumps and then define your associations as told in the wiki
regarding legacy schemas. Just give scaffolding a try and see if it
you errors…

Best Regards
Jan P.