geospatial searching
This commit is contained in:
+2
-1
@@ -7,8 +7,9 @@
|
||||
# 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
|
||||
|
||||
# Network::SignatureCollection.where(location: {"$near" => x.location, '$maxDistance' => 1.fdiv(111.12)}).map &:location_name
|
||||
|
||||
Reference in New Issue
Block a user