From 0c936c3ff02eec2341d0f58c2b72433c90ef90cc Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Thu, 15 Oct 2015 19:12:56 +0300 Subject: [PATCH] Optimize event query --- app/controllers/management/events_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/management/events_controller.rb b/app/controllers/management/events_controller.rb index 00744de..9662155 100644 --- a/app/controllers/management/events_controller.rb +++ b/app/controllers/management/events_controller.rb @@ -2,7 +2,7 @@ module Management class EventsController < ManagementController def index @conference = find_conference - @events = @conference.events.order(:title) + @events = @conference.events.order(:title).includes(:proposition, :proposer, :track, :event_type) end def show