Skip to content
Snippets Groups Projects
Commit 66dd2cd6 authored by Alexander Tipugin's avatar Alexander Tipugin
Browse files

Fixing Yandex response

parent a3bb3ee0
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,11 @@ module Geocoder::Result ...@@ -12,7 +12,11 @@ module Geocoder::Result
end end
def city def city
address_details['Locality']['LocalityName'] if state.empty?
address_details['Locality']['LocalityName']
else
address_details['AdministrativeArea']['Locality']['LocalityName']
end
end end
def country def country
...@@ -24,7 +28,11 @@ module Geocoder::Result ...@@ -24,7 +28,11 @@ module Geocoder::Result
end end
def state def state
"" if address_details['AdministrativeArea']
address_details['AdministrativeArea']['AdministrativeAreaName']
else
""
end
end end
def state_code 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