Events and Orgas geocoding now uses the country code if available

This commit is contained in:
echarp 2017-07-06 11:35:42 +02:00
parent b7beb0b5fa
commit 453e6d276d
2 changed files with 2 additions and 6 deletions

View File

@ -90,9 +90,7 @@ class Event < ApplicationRecord
end
def full_address
# Region seems to disturb openstreetmap :(
# address, city].compact.join ', '
[address, city, region.try(:name)].compact.join ', '
[address, city, region.try(:name), region.try(:code)].compact.join ', '
end
def hashtags

View File

@ -88,9 +88,7 @@ class Orga < ApplicationRecord
end
def full_address
# Region seems to disturb openstreetmap :(
# [address, city].compact.join ', '
[address, city, region.try(:name)].compact.join ', '
[address, city, region.try(:name), region.try(:code)].compact.join ', '
end
def to_s