Fixed city caching

This commit is contained in:
Godwin
2016-12-13 22:58:35 -08:00
parent e83c2fc464
commit 185c521f15
3 changed files with 9 additions and 5 deletions
+2 -2
View File
@@ -37,8 +37,8 @@ task update_cities: :environment do
end
end
unless c.place_id.present?
City.all.each do |c|
City.all.each do |c|
unless c.place_id.present?
location = Geocoder.search(c.address, language: 'en').first
c.place_id = location.data['place_id']
c.save!