Modify seeds file to make sure every guest is part of a group

This commit is contained in:
Manuel Bustillo 2024-07-11 23:25:29 +02:00
parent e5bf5ba074
commit 155278bb7e

View File

@ -28,7 +28,10 @@ Expense.create!(name: 'Transportation', amount: 3000, pricing_type: 'fixed')
Expense.create!(name: 'Invitations', amount: 200, pricing_type: 'fixed') Expense.create!(name: 'Invitations', amount: 200, pricing_type: 'fixed')
Expense.create!(name: 'Cake', amount: 500, pricing_type: 'fixed') Expense.create!(name: 'Cake', amount: 500, pricing_type: 'fixed')
<<<<<<< HEAD
=======
>>>>>>> 8fd0b7c (Modify seeds file to make sure every guest is part of a group)
samples = { samples = {
close_family: 10, close_family: 10,
family_1_group_a: 5, family_1_group_a: 5,
@ -49,9 +52,9 @@ end
300.times do 300.times do
guest = Guest.create!(first_name: Faker::Name.first_name, guest = Guest.create!(first_name: Faker::Name.first_name,
last_name: Faker::Name.last_name, last_name: Faker::Name.last_name,
email: Faker::Internet.email, email: Faker::Internet.email,
phone: Faker::PhoneNumber.cell_phone) phone: Faker::PhoneNumber.cell_phone)
guest.affinity_group_list.add(samples.sample) guest.affinity_group_list.add(samples.sample)
guest.save! guest.save!