Sha256: 8f3b134edfd48e9a40096e4b810b289b665f89d33f42722c1903592c2008f989
Contents?: true
Size: 561 Bytes
Versions: 10
Compression:
Stored size: 561 Bytes
Contents
module GroupMetrics # Tabulate count of Activities (within a study week) for a Group. class WeeklyActivitiesCount < WeeklyCount self.table_name = "activities" scope :in_the_past, lambda { where arel_table[:end_time].lt(Time.zone.now) } # To Do: fix naming and/or what is going on here # change to start_time and is_scheduled # and updated tests scope :unscheduled_or_in_the_future, lambda { where( arel_table[:start_time].eq(nil) .or(arel_table[:end_time].gt(Time.zone.now)) ) } end end
Version data entries
10 entries across 10 versions & 1 rubygems