I need to reverse geocode two locations “from” and “to”.
Using the geocoder gem (http://www.rubygeocoder.com/) I’ve tried:
reverse_geocoded_by :from_lat, :from_long, :address => :from_string
reverse_geocoded_by :to_lat, :to_long, :address => :to_string
after_validation :reverse_geocode
but only the second (to_string) is successfully reverse coded.
Can the geocoder gem support more than one geocoding step?
I banged my head against the wall for a while on this one too.
Try creating your own def:
…