开发者

What is the best way of add sample data in rails application, fixtures or migration?

I want to add a sample data to application using migration or fixtures , which is better? For example I have user model an开发者_如何学Cd want to add some sample user (foo,baar,baz)


Neither, use the db/seeds.rb file. Railscasts episode 179 covers this nicely.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜