forked from Trustie/forgeplus
fixed 项目优化排序
This commit is contained in:
parent
ccbbab0741
commit
abfb62f342
|
@ -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)
|
||||
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