Lately, I’m researching various RoR methods, technologies, and doing further ready on Agile software development methodologies. Below is a technique I’ve learned for seeding RoR databases.
- Database seeding technique
- Define the model and controller (nifty_scaffold is great for building quick, CRUD interfaces)
- Add data to the database via the CRUD interface
- Use sqlite3 command to extract the new seed data into a flat file.
In this example, the table contains custom fields for name and description.
cd [project folder]\db
sqlite3 development.sqlite3 Read more