I have some data in my development database that I would like to utilize as fixtures in my test environment. What is the best way in Rails 2.x to export a database table to a YAML fixture?
There is a rake task for this. You can specify RAILS_ENV if needed; the default is the development environment:
rake db:fixtures:dump # Create YAML test fixtures from data in an existing database.
1.4m articles
1.4m replys
5 comments
57.0k users