FIX 优化项目列表数据查询

This commit is contained in:
Jasder 2020-03-19 17:15:00 +08:00
parent ee7d2fca2d
commit ea74a7ab0a
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ class ProjectsController < ApplicationController
end end
def group_type_list def group_type_list
@project_group_list = Project.visible.group(:project_type).select('project_type, count(*) AS projects_count') @project_group_list = Project.visible.group(:project_type).select('project_type, count(project_type) AS projects_count').having("count(project_type) > ?", 0)
end end
def update def update