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:
Yorick Peterse 2015-10-06 13:52:19 +02:00
parent 1f14e689e5
commit d15eec6460
1 changed files with 1 additions and 1 deletions

View File

@ -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