More data in the geojson for each event, mostly start and end time
This commit is contained in:
parent
7605c39df5
commit
b8c83de708
|
@ -82,10 +82,10 @@ class Event < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def as_json(_options = {})
|
def as_json(_options = {})
|
||||||
popup = "<a href=\"/#{self.class.name.downcase.pluralize}/#{id}\""
|
|
||||||
popup += " >#{start_time.to_date} #{city}: #{title}</a>"
|
|
||||||
{ type: 'Feature', properties: {
|
{ type: 'Feature', properties: {
|
||||||
id: id, name: title, tags: tags, popupContent: popup
|
id: id, name: title, tags: tags,
|
||||||
|
popupContent: "<a href=\"/events/#{id}\">#{self}</a>",
|
||||||
|
start_time: start_time, end_time: end_time, locality: locality
|
||||||
}, geometry: {
|
}, geometry: {
|
||||||
type: 'Point', coordinates: [longitude, latitude]
|
type: 'Point', coordinates: [longitude, latitude]
|
||||||
} }
|
} }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user