Better region output in json

This commit is contained in:
echarp 2018-02-01 20:12:57 +01:00
parent 319e01f27b
commit 5cc0f6d39b

View File

@ -88,7 +88,7 @@ class Event < ApplicationRecord
def as_json(_options = {})
{ type: 'Feature', properties: {
id: id, name: title, start_time: start_time, end_time: end_time,
place_name: place_name, address: address, city: city, region: region,
place_name: place_name, address: address, city: city, region: region.name,
tags: tag_list, popupContent: "<a href=\"/events/#{id}\">#{self}</a>"
}, geometry: { type: 'Point', coordinates: [longitude, latitude] } }
end