Commit d15eec64 authored by Yorick Peterse's avatar Yorick Peterse

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.
parent 1f14e689
...@@ -6,7 +6,7 @@ class TrendingProjectsFinder ...@@ -6,7 +6,7 @@ class TrendingProjectsFinder
# Determine trending projects based on comments count # Determine trending projects based on comments count
# for period of time - ex. month # 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") group("projects.id").reorder("count(notes.id) DESC")
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment