Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Nation.switch_to 'slug'
- ActiveRecord::Base.logger = nil
- error_csv = CSV.open('/tmp/nzlabour_regeocode_errors.csv', 'wb')
- Address.all.each do |address|
- address.geocode_accuracy = nil
- address.save!
- rescue => e
- puts "Error: #{e.message}"
- error_csv << address.to_hash.values.push(e.message)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement