Running ruby script/generate scaffold Product Admin
is a wonderful way to set up well, exactly what it says, a scaffold.
My problem is that I have several other tables that are linked,
through foreign keys, to the Product table. Say an “authors” table.
Now when I go enter a new product, a book, I want the application to
provide a drop down list of authors generated from the records in the
authors table and let me choose an author when I enter my other book
details. I also want the application to allow me to administer the
authors table to CRUD authors.
I know that I can start off as above and do lots of copy/past and
search/replace of/in the MVC tree to provide CRUD for authors and list
them in the new product view, but I’d rather use any functionality
that Rails might have to auto generate these.
Can/should I run ruby script/generate scaffold Admin for each
entity in my schema?