The geocoding address does not use anymore the country if this country is "top level".

This should better handle the "other" country, which OSM has troubles with...
This commit is contained in:
echarp 2018-05-06 21:20:48 +02:00
parent 949d5dbd6a
commit 60df916a62
1 changed files with 3 additions and 1 deletions

View File

@ -86,7 +86,9 @@ class Event < ApplicationRecord
end
def full_address
[address, city, region, region.try(:region)].compact.join ', '
# Only uses the region if it is a sub-region and not a country
[address, city, region, region.try(:region) ? region.try(:region) : nil]
.compact.join ', '
end
def hashtags