修改首页搜索后的显示数量不对的问题

This commit is contained in:
sylor_huang@126.com
2020-04-22 09:32:39 +08:00
parent 2b24bc9724
commit 441f8eb877
3 changed files with 4 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ class ProjectsController < ApplicationController
is_admin = current_user && current_user&.admin?
scope = Projects::ListQuery.call(params.merge(is_admin: is_admin, user_id: current_user.try(:id)))
@total_count = scope.size
@projects = paginate(scope)
end