From eeb7f4ef61f13222ef11cbbccb1f00bd3cf6c28d Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 18 Oct 2015 19:47:11 +0300 Subject: [PATCH] Display only speakers with scheduled events --- app/controllers/api/speakers_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/speakers_controller.rb b/app/controllers/api/speakers_controller.rb index 871bb64..33f4cde 100644 --- a/app/controllers/api/speakers_controller.rb +++ b/app/controllers/api/speakers_controller.rb @@ -3,6 +3,6 @@ class Api::SpeakersController < Api::ApplicationController before_filter :require_current_conference! def index - @speakers = PersonalProfile.joins(user: [:events]).where(conference: current_conference) + @speakers = PersonalProfile.joins(user: [{events: [:slot] }]).where(conference: current_conference).uniq end end