From b25a4520f923df76b0430688ef4e80793d056c82 Mon Sep 17 00:00:00 2001 From: "John N. Milner" Date: Thu, 30 May 2013 19:52:57 -0400 Subject: [PATCH] Correct log criteria for Check Ins view --- app/components/check_ins.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/check_ins.rb b/app/components/check_ins.rb index 4763c7e..22b8653 100644 --- a/app/components/check_ins.rb +++ b/app/components/check_ins.rb @@ -4,7 +4,9 @@ class CheckIns < Netzke::Basepack::Grid super c.header = false c.model = "ActsAsLoggable::Log" - c.scope = lambda { |rel| rel.where(:log_action_id => ::ActsAsLoggable::UserAction.find_by_action("CHECKIN")). + c.scope = lambda { |rel| rel.where(:log_action_type => ::ActsAsLoggable::UserAction). + where(:loggable_type => "User"). + where(:log_action_id => ::ActsAsLoggable::UserAction.find_by_action("CHECKIN")). where("start_date >= ?", Time.zone.now.beginning_of_day); } c.columns = [