Back to not using region names in geocoding, it seems to disturb OSM... :(
This commit is contained in:
parent
7c8285c149
commit
f47c5e8a12
@ -97,7 +97,9 @@ class Event < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def full_address
|
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
|
end
|
||||||
|
|
||||||
def hashtags
|
def hashtags
|
||||||
|
@ -79,7 +79,9 @@ class Orga < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def full_address
|
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
|
end
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
|
@ -118,6 +118,7 @@ class EventTest < ActiveSupport::TestCase
|
|||||||
@event.city = 'world'
|
@event.city = 'world'
|
||||||
# Region is no longer used for geocoding..;
|
# Region is no longer used for geocoding..;
|
||||||
# @event.region.name = 'all'
|
# @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
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user