I am trying to switch my application to using geocoder. In my table places, I have columns for the address lat, lng, street_address, city and zip. Using a geocoder, I can happily fill in the lat, lng and address columns after checking with the next model in my places
attr_accessible :address, :lat, :lng
geocoded_by :address, :latitude => :lat, :longitude => :lng
after_validation :geocode, :if => :address_changed?
Is there a way for the geocoder to add the street name, city, and zip code to three other separate columns?
source
share