Skip to content

Commit aa987d6

Browse files
committed
Order tasks on collection page by rank
Also order the collections by title Fixes #1311
1 parent 196a240 commit aa987d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/controllers/collections_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ def index
1515
Collection.public_access
1616
else
1717
Collection.member(current_user)
18-
end.includes(:users, tasks: %i[user groups]).order(id: :asc).paginate(page: params[:page], per_page: per_page_param)
18+
end
19+
.includes(:users, collection_tasks: [task: %i[user groups]]).order(title: :asc)
20+
.paginate(page: params[:page], per_page: per_page_param)
1921

2022
authorize @collections
2123
end

0 commit comments

Comments
 (0)