
Add external CSV/XML based loading of seed data
Reported by Michael Bleigh | April 24th, 2008 @ 10:21 AM
Should be able to mass seed data from CSV or XML with syntax something like this:
User.seed_from_xml("users.xml", :login, :email)
User.seed_from_csv("users.csv", :login, :email, :columns => [:login, :email, :first_name, :last_name])
The file path will be relative to db/fixtures. Should also be able to still pass in a block and set values statically or from an array even from the loaded data.
No comments found
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
An attempt to simplify the usage of seed data in Rails applications through a dead simple API.