Skip to content

Commit

Permalink
Adding some user seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Jun 20, 2017
1 parent 0b4dab3 commit ceca853
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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

0 comments on commit ceca853

Please sign in to comment.