Create seed file from data already in the database

后端 未结 4 497
再見小時候
再見小時候 2020-12-07 20:06

I\'m using Rails 3.0.3 and have data for my \"categories\" table already in the database, but want to create a seed file from it. Is there any rake task that will generate t

4条回答
  •  天命终不由人
    2020-12-07 20:43

    There is a gem called seed_dump, which will do exactly what you want:

    • https://github.com/rroblak/seed_dump
    • http://rubygems.org/gems/seed_dump

提交回复
热议问题