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

Merge pull request #163 from kor6n/patch-1

Fix for: Issue #162
parents da7db55f 48d2e217
No related branches found
No related tags found
No related merge requests found
......@@ -14,8 +14,10 @@ module Geocoder::Result
def city
if state.empty?
address_details['Locality']['LocalityName']
else
address_details['AdministrativeArea']['Locality']['LocalityName']
elsif sub_state.empty?
state['Locality']['LocalityName']
else
sub_state['Locality']['LocalityName']
end
end
......@@ -34,6 +36,18 @@ module Geocoder::Result
""
end
end
def sub_state
if !state.empty?
if state['SubAdministrativeArea']
state['SubAdministrativeArea']['SubAdministrativeAreaName']
else
""
end
else
""
end
end
def state_code
""
......
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