Use >= instead of > in TrendingProjectsFinder
By using >= we can ensure we actually get all comments of the past month, instead of the comments of the past month minus the first day in the range.
This commit is contained in:
parent
1f14e689e5
commit
d15eec6460
|
@ -6,7 +6,7 @@ class TrendingProjectsFinder
|
|||
|
||||
# Determine trending projects based on comments count
|
||||
# for period of time - ex. month
|
||||
projects.joins(:notes).where('notes.created_at > ?', start_date).
|
||||
projects.joins(:notes).where('notes.created_at >= ?', start_date).
|
||||
group("projects.id").reorder("count(notes.id) DESC")
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue