From 41718b9fcaa1893167030aa5a8dd7cbaaf9ce143 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Fri, 4 Oct 2019 14:37:36 +0300 Subject: [PATCH] Do not show rejected propositions in gauge --- app/controllers/api/events_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/events_controller.rb b/app/controllers/api/events_controller.rb index deaee7d..ac7f0a8 100644 --- a/app/controllers/api/events_controller.rb +++ b/app/controllers/api/events_controller.rb @@ -8,7 +8,7 @@ class Api::EventsController < Api::ApplicationController end def halfnarp_friendly - @events = current_conference.events.includes(:track, :event_type) + @events = current_conference.events.joins(:proposition).includes(:track, :event_type).where.not(propositions: {status: :rejected}) render json: @events, include: [:track, :event_type] end end