mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-28 12:58:48 +01:00
Fix the top 10 longest running projects list
Sorting by running time without a reverse takes the shortest running projects.
This commit is contained in:
parent
a8e2978054
commit
500892e1a4
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ module Stats
|
|||
|
||||
def find_top10_longest_running_projects
|
||||
projects = user.projects.order('created_at ASC')
|
||||
projects.sort_by{ |p| p.running_time }.take(10)
|
||||
projects.sort_by{ |p| p.running_time }.reverse.take(10)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue