Skip to content
Snippets Groups Projects
Commit 3385ccd8 authored by Alex Reisner's avatar Alex Reisner
Browse files

Allow geocoder search method to be something other than an ActiveRecord attribute.

parent 2be6d155
No related branches found
No related tags found
No related merge requests found
...@@ -130,10 +130,10 @@ module Geocoder ...@@ -130,10 +130,10 @@ module Geocoder
## ##
# Fetch coordinates based on the object's location. # Fetch coordinates based on the object's location.
# Returns an array <tt>[lat,lon]</tt>. # Returns an array <tt>[lat,lon]</tt>.search
# #
def fetch_coordinates def fetch_coordinates
location = read_attribute(self.class.geocoder_options[:method_name]) location = send(self.class.geocoder_options[:method_name])
Geocoder.fetch_coordinates(location) Geocoder.fetch_coordinates(location)
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment