Heinz Strunk wrote:
> Hello,
> 
> I'm using the seeds.rb to create some user records:
> 100.times do
>   user = User.new
>   user.username = Faker::Name.first_name
>   user.email = user.username+"@example.com"
>   user.save!
> end

This isn't directly a solution to your problem, but...

Is this for testing?  If so, I recommend using factories, not seeds. 
seeds.rb is for application seed data (such as tables of countries or 
shipping rates), not what you're apparently doing here.

...but why do your tests need 100 records to begin with?  Normally, you 
should just call the factory within each test to create the (1 or 2) 
records you need for that test.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to