diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb index 05f98d6d..035ab366 100644 --- a/app/controllers/conferences_controller.rb +++ b/app/controllers/conferences_controller.rb @@ -6,9 +6,8 @@ class ConferencesController < ApplicationController load_and_authorize_resource find_by: :short_title, except: :show def index - @current, @antiquated = Conference.reorder(start_date: :asc).all.partition do |conference| - conference.end_date >= Date.current - end + @current = Conference.where('end_date >= ?', Date.current).reorder(start_date: :asc) + @antiquated = Conference.where('end_date < ?', Date.current) end def show