Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added neighborhood method to Geocoder::Result::Google class #420

Merged
merged 1 commit into from

2 participants

@azlantaher88

No description provided.

@alexreisner alexreisner merged commit fad6274 into alexreisner:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 20, 2013
  1. @azlantaher88
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/geocoder/results/google.rb
View
6 lib/geocoder/results/google.rb
@@ -11,6 +11,12 @@ def address(format = :full)
formatted_address
end
+ def neighborhood
+ if neighborhood = address_components_of_type(:neighborhood).first
+ neighborhood['long_name']
+ end
+ end
+
def city
fields = [:locality, :sublocality,
:administrative_area_level_3,
Something went wrong with that request. Please try again.