在http://ryandaigle.com/中这篇文章: What's New in Edge Rails: Database Seeding 中提到这个功能 (This feature is schedule for: Rails v3.0), 在发布 的版本中已经实现 在rails的db文件中有seeds.rb这个文件。它是用来(This file should contain all the record creation needed to seed the database with its default values),你可以使用相关的rake命令来载入数据。
rails的seeding已经实现
最新推荐文章于 2024-11-05 23:33:09 发布
Rails v3.0引入了数据播种功能,通过在db/seeds.rb文件中定义记录创建逻辑,可以轻松地为数据库填充默认数据。开发者只需运行特定的rake命令即可完成数据加载。
1356

被折叠的 条评论
为什么被折叠?



