Attempt to use, again, the region, in the reverse geocoding process

This commit is contained in:
echarp 2017-07-02 12:25:43 +02:00
parent 7afa2951d0
commit 37266beec2
3 changed files with 6 additions and 6 deletions

View File

@ -91,8 +91,8 @@ class Event < ApplicationRecord
def full_address def full_address
# Region seems to disturb openstreetmap :( # Region seems to disturb openstreetmap :(
# [address, city, region.try(:name)].compact.join ', ' # address, city].compact.join ', '
[address, city].compact.join ', ' [address, city, region.try(:name)].compact.join ', '
end end
def hashtags def hashtags

View File

@ -87,8 +87,8 @@ class Orga < ApplicationRecord
def full_address def full_address
# Region seems to disturb openstreetmap :( # Region seems to disturb openstreetmap :(
# [address, city, region.try(:name)].compact.join ', ' # [address, city].compact.join ', '
[address, city].compact.join ', ' [address, city, region.try(:name)].compact.join ', '
end end
def to_s def to_s

View File

@ -120,7 +120,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', @event.full_address
assert_equal 'hello, world', @event.full_address assert_equal 'hello, world, Alsace', @event.full_address
end end
end end