修改列表页的搜索问题
This commit is contained in:
parent
51f17cfac3
commit
801a630f6d
|
@ -27,6 +27,9 @@ class Projects::ListQuery < ApplicationQuery
|
|||
.with_project_category(params[:category_id])
|
||||
.with_project_language(params[:language_id])
|
||||
|
||||
custom_sort(scope, params[:sort_by], params[:sort_direction])
|
||||
sort = parms[:sort_by] || "updated_on"
|
||||
sort_direction = params[:sort_direction] || "desc"
|
||||
scope = scope.order("projects.#{sort} #{sort_direction}")
|
||||
# custom_sort(scope, params[:sort_by], params[:sort_direction])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue