Events' json now includes events' region

This commit is contained in:
echarp 2018-02-01 20:10:48 +01:00
parent 43a957e2b7
commit 319e01f27b

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, locality: locality,
place_name: place_name, address: address, city: city, region: region,
tags: tag_list, popupContent: "<a href=\"/events/#{id}\">#{self}</a>"
}, geometry: { type: 'Point', coordinates: [longitude, latitude] } }
end