Back to not using region names in geocoding, it seems to disturb OSM... :(

This commit is contained in:
echarp 2016-04-20 16:25:53 +02:00
parent 7c8285c149
commit f47c5e8a12
3 changed files with 8 additions and 3 deletions

View File

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

View File

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

View File

@ -118,6 +118,7 @@ class EventTest < ActiveSupport::TestCase
@event.city = 'world'
# Region is no longer used for geocoding..;
# @event.region.name = 'all'
assert_equal 'hello, world, Alsace', @event.full_address
# assert_equal 'hello, world, Alsace', @event.full_address
assert_equal 'hello, world', @event.full_address
end
end