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

Version Path
think_feel_do_engine-3.19.9 app/models/group_metrics/weekly_activities_count.rb
think_feel_do_engine-3.19.8 app/models/group_metrics/weekly_activities_count.rb
think_feel_do_engine-3.19.7 app/models/group_metrics/weekly_activities_count.rb
think_feel_do_engine-3.19.6 app/models/group_metrics/weekly_activities_count.rb
think_feel_do_engine-3.19.5 app/models/group_metrics/weekly_activities_count.rb
think_feel_do_engine-3.19.4 app/models/group_metrics/weekly_activities_count.rb
think_feel_do_engine-3.19.3 app/models/group_metrics/weekly_activities_count.rb
think_feel_do_engine-3.19.2 app/models/group_metrics/weekly_activities_count.rb
think_feel_do_engine-3.19.1 app/models/group_metrics/weekly_activities_count.rb
think_feel_do_engine-3.19.0 app/models/group_metrics/weekly_activities_count.rb