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

recurrent
echarp 7 years ago
parent 7c8285c149
commit f47c5e8a12
  1. 4
      app/models/event.rb
  2. 4
      app/models/orga.rb
  3. 3
      test/models/event_test.rb

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

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

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

Loading…
Cancel
Save