From 5cc0f6d39b63658ee2076706a07b6e848adf5e83 Mon Sep 17 00:00:00 2001 From: echarp Date: Thu, 1 Feb 2018 20:12:57 +0100 Subject: [PATCH] Better region output in json --- app/models/event.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/event.rb b/app/models/event.rb index 72167908..a690c246 100644 --- a/app/models/event.rb +++ b/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: "#{self}" }, geometry: { type: 'Point', coordinates: [longitude, latitude] } } end