Best way to export a database table to a YAML file?

后端 未结 11 1293
野的像风
野的像风 2020-12-07 14:54

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

11条回答
  •  悲哀的现实
    2020-12-07 15:46

    Iron Fixture Extractor was built for exactly this purpose. It's particularly good for situations where you want to use different fixture sets for different testing scenarios (rather than having all fixtures for all tests). It provides functionality for extracting, loading, rebuilding fixtures, truncating tables, or snagging particular hashes from your fixture yaml files.

提交回复
热议问题