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

Merge pull request #362 from alno/google_sub_state

Substate for Google result
parents 0b8f4d5d 897e6ffa
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,18 @@ module Geocoder::Result ...@@ -41,6 +41,18 @@ module Geocoder::Result
end end
end end
def sub_state
if state = address_components_of_type(:administrative_area_level_2).first
state['long_name']
end
end
def sub_state_code
if state = address_components_of_type(:administrative_area_level_2).first
state['short_name']
end
end
def country def country
if country = address_components_of_type(:country).first if country = address_components_of_type(:country).first
country['long_name'] country['long_name']
......
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