From 6171e484cc05e9f0779ae872e9ab6157b570f303 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Fri, 13 Sep 2024 22:58:10 +0300 Subject: [PATCH] Speed up json generation --- app/controllers/api/events_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/events_controller.rb b/app/controllers/api/events_controller.rb index ac7f0a8..53fa8ba 100644 --- a/app/controllers/api/events_controller.rb +++ b/app/controllers/api/events_controller.rb @@ -9,6 +9,6 @@ class Api::EventsController < Api::ApplicationController def halfnarp_friendly @events = current_conference.events.joins(:proposition).includes(:track, :event_type).where.not(propositions: {status: :rejected}) - render json: @events, include: [:track, :event_type] + render json: JSON.dump(@events.to_json(include: [:track, :event_type])) end end