You want 40 instances of 5 different types of objects, right?
[Model1,Model2,Model3,Model4,Model5].each do |model| 0.upto(40) { model.create(:whatever => 3) } end
Is this what you're looking for?
Jeff softiesonrails.com
You want 40 instances of 5 different types of objects, right?
[Model1,Model2,Model3,Model4,Model5].each do |model| 0.upto(40) { model.create(:whatever => 3) } end
Is this what you're looking for?
Jeff softiesonrails.com
You can load your test fixtures into the db using rake db:fixtures:load.
b
mixplate wrote: