Seed your Rails 3 models using CSV files.
Install it¶ ↑
In your gem file:
Using it¶ ↑
Seedsv requires the developer to create the folder:
In this folder you will place all your CSV files with the same name as your database tables. The format of the first line of each file is the following:
column_name_1, column_name_2, column_name_3...
So for example, to seed the model City, you would normally have the file: /db/csv/cities.csv
This is the example content of the file
name, state_id Monterrey, 1 Guadalajara, 2
To seed the database with this file
If something goes wrong and you want to delete everything seeded from CSV files:
Copyright © 2010 Innku. See LICENSE for details.