[FIX]项目列表total_count

This commit is contained in:
viletyy 2021-01-28 14:45:33 +08:00
parent f7e19cb3a4
commit 80002be670
1 changed files with 2 additions and 2 deletions

View File

@ -11,10 +11,10 @@ class ProjectsController < ApplicationController
scope = Projects::ListQuery.call(params)
# @projects = kaminari_paginate(scope)
@projects = paginate scope.includes(:project_category, :project_language, :repository, :project_educoder, :apply_signatures, :members, owner: :user_extension)
@projects = kaminari_paginate scope.includes(:project_category, :project_language, :repository, :project_educoder, :apply_signatures, :members, owner: :user_extension)
category_id = params[:category_id]
@total_count =
@total_count = @projects.total_count
if category_id.blank?
ps = ProjectStatistic.first
ps.common_projects_count + ps.mirror_projects_count unless ps.blank?