Fix trending projects ordering
This commit is contained in:
parent
2317977077
commit
3c2139ed17
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ class TrendingProjectsFinder
|
|||
# for period of time - ex. month
|
||||
projects.joins(:notes).where('notes.created_at > ?', start_date).
|
||||
select("projects.*, count(notes.id) as ncount").
|
||||
group("projects.id").order("ncount DESC")
|
||||
group("projects.id").reorder("ncount DESC")
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue