Attempt to use, again, the region, in the reverse geocoding process
This commit is contained in:
parent
7afa2951d0
commit
37266beec2
@ -91,8 +91,8 @@ class Event < ApplicationRecord
|
||||
|
||||
def full_address
|
||||
# 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
|
||||
|
||||
def hashtags
|
||||
|
@ -87,8 +87,8 @@ class Orga < ApplicationRecord
|
||||
|
||||
def full_address
|
||||
# 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
|
||||
|
||||
def to_s
|
||||
|
@ -120,7 +120,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', @event.full_address
|
||||
# assert_equal 'hello, world', @event.full_address
|
||||
assert_equal 'hello, world, Alsace', @event.full_address
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user