Closed michaelhayman closed 12 years ago
Use fixtures to do this.
Just as a note, here's an example of how to populate tables with data in a migration:
Word.new(:eng=>'yes', :pl=>'tak').save Word.new(:eng=>'no', :pl=>'nie').save Word.new(:eng=>'everything', :pl=>'wszystko').save end
bundle exec rake db:fixtures:load FIXTURES=days,points,needs
Use fixtures to do this.
Just as a note, here's an example of how to populate tables with data in a migration:
Word.new(:eng=>'yes', :pl=>'tak').save Word.new(:eng=>'no', :pl=>'nie').save Word.new(:eng=>'everything', :pl=>'wszystko').save end