From 4d9432c76cf70acc11eedee6a3b093177d2ed0e2 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sat, 15 Aug 2015 09:04:57 +0300 Subject: [PATCH] Limit the displayed events to the current conference --- app/controllers/public/events_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/public/events_controller.rb b/app/controllers/public/events_controller.rb index 2928599..e9eb415 100644 --- a/app/controllers/public/events_controller.rb +++ b/app/controllers/public/events_controller.rb @@ -3,7 +3,7 @@ module Public before_filter :authenticate_user! def index - @events = Event.joins(:proposition, :participations).where('propositions.proposer_id = ? OR participations.participant_id = ?', current_user.id, current_user.id) + @events = Event.joins(:conference, :proposition, :participations).where(conference: current_conference).where('propositions.proposer_id = ? OR participations.participant_id = ?', current_user.id, current_user.id) end def edit