From 4d93de0e2165cb9b3b7bdd1ae3a0c88f052a411a Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Mon, 24 Oct 2016 18:51:16 +0300 Subject: [PATCH] Limit the personal profiles to the current conference --- 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 7fe7399..c98a7fc 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: {participations: {event: :proposition}}).where(events: {id: current_conference.approved_events.pluck(:id)}).distinct + @speakers = PersonalProfile.joins(user: {participations: {event: :proposition}}).where(events: {id: current_conference.approved_events.pluck(:id)}, conference: current_conference).distinct end end