|
@@ -39,7 +39,7 @@ class Group < ApplicationRecord
|
39
|
39
|
reference ||= Time.zone.now
|
40
|
40
|
activities
|
41
|
41
|
.where('start < ?', reference)
|
42
|
|
- .where('end > ?', reference)
|
|
42
|
+ .where('activities.end > ?', reference)
|
43
|
43
|
end
|
44
|
44
|
|
45
|
45
|
# @return [Array<Activity>]
|
|
@@ -47,7 +47,7 @@ class Group < ApplicationRecord
|
47
|
47
|
def previous_activities(reference = nil)
|
48
|
48
|
reference ||= Time.zone.now
|
49
|
49
|
activities
|
50
|
|
- .where('end < ?', reference)
|
|
50
|
+ .where('activities.end < ?', reference)
|
51
|
51
|
.order(end: :desc)
|
52
|
52
|
.limit(3)
|
53
|
53
|
end
|