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.
精彩评论