gmaps_gem 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gmaps_gem.rb +3 -3
- metadata +1 -1
data/lib/gmaps_gem.rb
CHANGED
@@ -15,7 +15,7 @@ class Place < ActiveRecord::Base
|
|
15
15
|
a = result
|
16
16
|
lat = a["results"].first["geometry"]["location"]["lat"]
|
17
17
|
lng = a["results"].first["geometry"]["location"]["lng"]
|
18
|
-
latlng = [lat,lng]
|
18
|
+
self.latlng = [lat,lng]
|
19
19
|
end
|
20
20
|
|
21
21
|
def reverse_geocode(lat,lng)
|
@@ -25,8 +25,8 @@ class Place < ActiveRecord::Base
|
|
25
25
|
result = JSON.parse(data)
|
26
26
|
|
27
27
|
a = result
|
28
|
-
address = a["results"].first["address_components"].first["long_name"]
|
29
|
-
puts address
|
28
|
+
self.address = a["results"].first["address_components"].first["long_name"]
|
29
|
+
#puts address
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|