fixed 项目列表查询排序优化
This commit is contained in:
parent
b05e08a1c5
commit
62a9941e22
|
@ -17,7 +17,7 @@ class Projects::ListQuery < ApplicationQuery
|
|||
sort = params[:sort_by] || "updated_on"
|
||||
sort_direction = params[:sort_direction] || "desc"
|
||||
|
||||
# collection = optimize_sorting(collection, sort) if params[:category_id].present?
|
||||
collection = optimize_sorting(collection, sort) if params[:category_id].present?
|
||||
custom_sort(collection, sort, sort_direction)
|
||||
|
||||
# scope = scope.reorder("projects.#{sort} #{sort_direction}")
|
||||
|
|
Loading…
Reference in New Issue