From 769cc6c97009bf1c9e19c3920723534f4cc68a2a Mon Sep 17 00:00:00 2001 From: James Mason Date: Sun, 25 Feb 2018 20:11:09 -0800 Subject: [PATCH] Modify query to work better across databases --- app/controllers/admin/conferences_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/conferences_controller.rb b/app/controllers/admin/conferences_controller.rb index 4fbc3612..1fc978af 100644 --- a/app/controllers/admin/conferences_controller.rb +++ b/app/controllers/admin/conferences_controller.rb @@ -127,8 +127,10 @@ module Admin @new_program_length = @conference.new_program_hours(current_user.last_sign_in_at) @total_withdrawn = @all_events.where(state: :withdrawn).count - @new_withdrawn = @all_events - .where('state = "withdrawn" and created_at > ?', current_user.last_sign_in_at).count + @new_withdrawn = @all_events.where(state: :withdrawn).where( + 'events.created_at > ?', + current_user.last_sign_in_at + ).count # Step by step list @conference_progress = @conference.get_status