Sample data for signatures
This commit is contained in:
@@ -5,3 +5,10 @@
|
||||
#
|
||||
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
||||
# Mayor.create(name: 'Emanuel', city: cities.first)
|
||||
|
||||
@cities = CSV.read Rails.root.join('db', 'plz_ch.csv')
|
||||
|
||||
@cities.sample(122).each do |city|
|
||||
tmp_date = DateTime.now + rand(50)
|
||||
Network::SignatureCollection.create(location_zip: city.first, location_name: city.last, location_address: Faker::Address.street_address, event_date_start: tmp_date, event_date_end: tmp_date+rand(10).to_f/10)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user