Skip to content
Permalink
3ba8092017
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
9 lines (7 sloc) 251 Bytes
class GeocodeJob < ActiveJob::Base
def perform(location)
address = [location.address, location.zipcode].join(" ")
latitude, longitude = Geocoder.coordinates(address)
location.update!(latitude: latitude, longitude: longitude)
end
end