Fix the seeds
This commit is contained in:
parent
df4878f722
commit
f894e71ba0
1 changed files with 5 additions and 8 deletions
13
db/seeds.rb
13
db/seeds.rb
|
@ -6,24 +6,21 @@
|
||||||
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
||||||
# Mayor.create(name: 'Emanuel', city: cities.first)
|
# Mayor.create(name: 'Emanuel', city: cities.first)
|
||||||
|
|
||||||
User.create!(name: "Mats",
|
User.create! name: "Mats",
|
||||||
nickname: "Basho",
|
nickname: "Basho",
|
||||||
last_name: "Myncke",
|
last_name: "Myncke",
|
||||||
email: "mmyncke@gmail.com",
|
|
||||||
password: "banaan12",
|
password: "banaan12",
|
||||||
password_confirmation: "banaan12")
|
password_confirmation: "banaan12"
|
||||||
|
|
||||||
99.times do |n|
|
99.times do |n|
|
||||||
name = Faker::Name.first_name
|
name = Faker::Name.first_name
|
||||||
nickname = Faker::Name.title
|
nickname = Faker::Name.title
|
||||||
last_name = Faker::Name.last_name
|
last_name = Faker::Name.last_name
|
||||||
email = Faker::Internet.email
|
|
||||||
password = "password"
|
password = "password"
|
||||||
|
|
||||||
User.create!(name: name,
|
User.create! name: name,
|
||||||
nickname: nickname,
|
nickname: nickname,
|
||||||
last_name: last_name,
|
last_name: last_name,
|
||||||
email: email,
|
password: password,
|
||||||
password: password,
|
password_confirmation: password
|
||||||
password_confirmation: password)
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue