We also publish events submission_time and decision_time in their json

This commit is contained in:
echarp 2018-03-18 14:41:48 +01:00
parent 99ff9fa4c1
commit 5a2dba3b2e
1 changed files with 1 additions and 0 deletions

View File

@ -88,6 +88,7 @@ class Event < ApplicationRecord
def as_json(_options = {})
{ type: 'Feature', properties: {
id: id, name: title, start_time: start_time, end_time: end_time,
submission_time: submission_time, decision_time: decision_time,
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] } }