I used “rake db:fixtures:load” to insert dummy datas into development db. I start using factory_girl. Are there any way to insert datas in RAILS_ROOT/spec/factories/*.rb to development db?
I used rake db:fixtures:load to insert dummy datas into development db. I start using
Share
Factories are not intended to fill the database. They will generate random data for your object attributes (unless otherwise specified). Hence, it won’t fill the development database with defined data.
What you should use here are seeds. More info on:
http://ryandaigle.com/articles/2009/5/13/what-s-new-in-edge-rails-database-seeding
and
http://rails-bestpractices.com/posts/20-isolating-seed-data