Another attempt at managing region with a parent one...

This commit is contained in:
echarp 2018-05-06 21:25:35 +02:00
parent 93802ce575
commit ad01be89c4

View File

@ -87,8 +87,8 @@ class Event < ApplicationRecord
def full_address
# Only uses the region if it is a sub-region and not a country
[address, city, region, region.try(:region) ? region.try(:region) : nil]
.compact.join ', '
[address, city, region.try(:region).present? ? region : nil,
region.try(:region)].compact.join ', '
end
def hashtags