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

Remove call to 'returning' method.

The method was removed from Rails 3 RC 1, though it appears it will be
included in the final release. See:

Removed:
http://github.com/rails/rails/commit/b0b9bf320409b66c6c6b680371aca590297cd4cc

Reinstated:
http://github.com/rails/rails/commit/88b5f938cf7d3eb26ad204451a4dbb9c2cf4f571
parent 87ed0e6b
No related branches found
No related tags found
No related merge requests found
......@@ -174,14 +174,15 @@ module Geocoder
# coordinates as an array: <tt>[lat, lon]</tt>.
#
def fetch_coordinates(save = false)
location = send(self.class.geocoder_options[:method_name])
returning Geocoder.fetch_coordinates(location) do |c|
unless c.blank?
method = (save ? "update" : "write") + "_attribute"
send method, self.class.geocoder_options[:latitude], c[0]
send method, self.class.geocoder_options[:longitude], c[1]
end
coords = Geocoder.fetch_coordinates(
send(self.class.geocoder_options[:method_name])
)
unless coords.blank?
method = (save ? "update" : "write") + "_attribute"
send method, self.class.geocoder_options[:latitude], coords[0]
send method, self.class.geocoder_options[:longitude], coords[1]
end
coords
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