Events and Orgas geocoding now uses the country code if available

rails5
echarp 5 years ago
parent b7beb0b5fa
commit 453e6d276d
  1. 4
      app/models/event.rb
  2. 4
      app/models/orga.rb

@ -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

@ -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

Loading…
Cancel
Save