Till now, i have been using Fixtures, along with a rake task to create some seed data for my database. This worked well, but i suddenly have weird problems(like getting autogen ids of 1,2,3.. in a model and then wrong ids in the join model, making the association not work at all).
Thus, i was wondering what a better alternative is. I’ve read about different things, as well as the railscast on seeding data.
My data does not really share same pieces of information. It’s like separate entries that have to be inserted as they are. For instance, think that i have to insert 1000 users that have particular abilities and skills. This needs some join models and some neat handling of the associations like fixtures do.
So, is there a better than fixtures way to accomplish that ?
Here are three different options which I use all the time. Let me know what you think and how you get on. All the best.
Github Gist >>