Limit the personal profiles to the current conference

This commit is contained in:
Petko Bordjukov 2016-10-24 18:51:16 +03:00
parent b679efbd2b
commit 4d93de0e21
1 changed files with 1 additions and 1 deletions

View File

@ -3,6 +3,6 @@ class Api::SpeakersController < Api::ApplicationController
before_filter :require_current_conference! before_filter :require_current_conference!
def index 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
end end