tags:

views:

65

answers:

2
rake db:fixtures:load

The YAML file which I put in the test/fixtures following is imported automatically by DB. Is there a method that converts the contents of the database into a YAML file for fixtures?

+1  A: 

There's a great plugin called yaml_db. I used it a couple of time to migrate data from one database to an other.

Simone Carletti
Thanks a lot !!! Is it ok for rails 2.0.x?
ffffff
I haven't tested it with Rails 2.0.x but only with Rails >= 2.1.x. However it should work with 2.0.x as well.
Simone Carletti
A: 

I'm not on my mac so I can't try it, but can't you use to_yaml?

Ben Hall