Sha256: 308dd66434c537de19b754e629953fadb6a91d8922136eda0c042b3b3fcedfd6

Contents?: true

Size: 1.08 KB

Versions: 16

Compression:

Stored size: 1.08 KB

Contents

require 'shared_sample_data'

school = Gaku::School.where(
                              name: 'Test School',
                              slogan: 'Test School Slogan',
                              founded: Time.now,
                              principal: 'Test School Principal',
                              vice_principal: 'Test School Vice Principal'
                            ).first_or_create!

campus1 = school.campuses.where(name: 'Biology Campus').first_or_create!
campus2 = school.campuses.where(name: 'Informatics Campus').first_or_create!

campus1.address = Gaku::Address.where(random_address.merge(addressable: campus1)).first_or_create!
campus1.contacts.where(random_email).first_or_create!
campus1.contacts.where(random_home_phone).first_or_create!
campus1.contacts.where(random_mobile_phone).first_or_create!

campus2.address = Gaku::Address.where(random_address.merge(addressable: campus2)).first_or_create!
campus2.contacts.where(random_email).first_or_create!
campus2.contacts.where(random_home_phone).first_or_create!
campus2.contacts.where(random_mobile_phone).first_or_create!

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
gaku_sample-0.3.0 db/sample/gaku/schools.rb
gaku_sample-0.3.0.pre.4 db/sample/gaku/schools.rb
gaku_sample-0.3.0.pre.3 db/sample/gaku/schools.rb
gaku_sample-0.3.0.pre.2 db/sample/gaku/schools.rb
gaku_sample-0.3.0.pre.1 db/sample/gaku/schools.rb
gaku_sample-0.3.0.pre.0 db/sample/gaku/schools.rb
gaku-0.2.4 sample/db/sample/gaku/schools.rb
gaku_sample-0.2.4 db/sample/gaku/schools.rb
gaku-0.2.3 sample/db/sample/gaku/schools.rb
gaku_sample-0.2.3 db/sample/gaku/schools.rb
gaku-0.2.2 sample/db/sample/gaku/schools.rb
gaku_sample-0.2.2 db/sample/gaku/schools.rb
gaku-0.2.1 sample/db/sample/gaku/schools.rb
gaku_sample-0.2.1 db/sample/gaku/schools.rb
gaku-0.2.0 sample/db/sample/gaku/schools.rb
gaku_sample-0.2.0 db/sample/gaku/schools.rb