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

Rename fetch_and_assign_coordinates to fetch_coordinates\!.

parent a5aaa892
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ Assuming +Venue+ is a geocoded model:
Assuming +obj+ has a valid string for its +location+:
obj.fetch_coordinates # returns coordinates [lat, lon]
obj.fetch_and_assign_coordinates # writes coordinates to object
obj.fetch_coordinates! # also writes coordinates to object
Assuming +obj+ is geocoded (has latitude and longitude):
......
......@@ -158,9 +158,9 @@ module Geocoder
end
##
# Fetch and assign +latitude+ and +longitude+.
# Fetch coordinates and assign +latitude+ and +longitude+.
#
def fetch_and_assign_coordinates
def fetch_coordinates!
returning fetch_coordinates do |c|
unless c.blank?
write_attribute(self.class.geocoder_latitude_attr, c[0])
......
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