Sha256: fadceb3dc5770d3d7b491246a70b27941de517b4ff19465349e7e85944c7b714
Contents?: true
Size: 1.08 KB
Versions: 6
Compression:
Stored size: 1.08 KB
Contents
# encoding: utf-8 require 'shared_sample_data' say "Creating #{@count[:disposals]} teachers with addresses and contacts ...".yellow batch_create(@count[:disposals]) do teacher = Gaku::Teacher.where(random_person).first_or_create! teacher.addresses.where(random_address.merge(deleted: true)).first_or_create! teacher.contacts.where(random_home_phone.merge(deleted: true)).first_or_create! end say "Creating #{@count[:disposals]} students with addresses and contacts ...".yellow batch_create(@count[:disposals]) do student = Gaku::Student.where(random_person).first_or_create! student.addresses.where(random_address.merge(deleted: true)).first_or_create! student.contacts.where(random_home_phone.merge(deleted: true)).first_or_create! end say "Creating #{@count[:disposals]} guardians with addresses and contacts ...".yellow batch_create(@count[:disposals]) do guardian = Gaku::Guardian.where(random_person).first_or_create! guardian.addresses.where(random_address.merge(deleted: true)).first_or_create! guardian.contacts.where(random_home_phone.merge(deleted: true)).first_or_create! end
Version data entries
6 entries across 6 versions & 2 rubygems