From ceca8534bf48307651dce622f015f5fa24710a43 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 20 Jun 2017 15:02:50 -0700 Subject: [PATCH] Adding some user seeds --- db/seeds.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/db/seeds.rb b/db/seeds.rb index 59358723..0b201ca3 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -6,6 +6,7 @@ r = Random.new +=begin 500.times do |i| Thing.where(city_id: i).first_or_initialize.tap do |thing| thing.name = "Some Drain #{i}" @@ -15,3 +16,18 @@ thing.save! end end + +=end + + +1000.times do |i| + first_name = Faker::Name.first_name + last_name = Faker::Name.last_name + email = "user-#{i+1}@usertest.org" + password = "pass1234" + User.create!(first_name: first_name, + last_name: last_name, + email: email, + password: password) +end +