Speed up json generation

This commit is contained in:
Petko Bordjukov 2024-09-13 22:58:10 +03:00
parent 2bacd84654
commit 6171e484cc
1 changed files with 1 additions and 1 deletions

View File

@ -9,6 +9,6 @@ class Api::EventsController < Api::ApplicationController
def halfnarp_friendly def halfnarp_friendly
@events = current_conference.events.joins(:proposition).includes(:track, :event_type).where.not(propositions: {status: :rejected}) @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
end end