From aefe919b9820f73fffe6dd99f333a3bab3a3de93 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Mon, 23 Oct 2017 01:30:15 +0300 Subject: [PATCH] Do not display duplicate entries --- app/controllers/public/conference_feedbacks_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/public/conference_feedbacks_controller.rb b/app/controllers/public/conference_feedbacks_controller.rb index 9b76e83..e412f3b 100644 --- a/app/controllers/public/conference_feedbacks_controller.rb +++ b/app/controllers/public/conference_feedbacks_controller.rb @@ -4,7 +4,7 @@ class Public::ConferenceFeedbacksController < Public::ApplicationController @unrated_events = @conference.events .joins(:proposition).approved .joins('LEFT JOIN feedbacks ON feedbacks.feedback_receiving_id = events.id AND feedbacks.feedback_receiving_type = \'Event\'') - .where('feedbacks.session_id != ? OR feedbacks.id IS NULL', session.id) + .where('feedbacks.session_id != ? OR feedbacks.id IS NULL', session.id).distinct @rated_events = @conference.events .joins(:proposition).approved