修改搜索的错误

This commit is contained in:
sylor_huang@126.com 2020-04-10 19:46:04 +08:00
parent 801a630f6d
commit cebab206b8
1 changed files with 2 additions and 1 deletions

View File

@ -27,9 +27,10 @@ class Projects::ListQuery < ApplicationQuery
.with_project_category(params[:category_id])
.with_project_language(params[:language_id])
sort = parms[:sort_by] || "updated_on"
sort = params[:sort_by] || "updated_on"
sort_direction = params[:sort_direction] || "desc"
scope = scope.order("projects.#{sort} #{sort_direction}")
scope
# custom_sort(scope, params[:sort_by], params[:sort_direction])
end
end