Better region output in json
This commit is contained in:
parent
319e01f27b
commit
5cc0f6d39b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user