Better region output in json

remotes/origin/master
echarp 5 years ago
parent 319e01f27b
commit 5cc0f6d39b
  1. 2
      app/models/event.rb

@ -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…
Cancel
Save