修改列表页的分类数量

This commit is contained in:
sylor_huang@126.com
2020-03-26 09:39:52 +08:00
parent ffee697f2a
commit 3b3ad254f1
4 changed files with 15 additions and 14 deletions

View File

@@ -46,7 +46,9 @@ class ProjectsController < ApplicationController
else
projects = Project.visible
end
@project_group_list = projects.group(:project_type).select('project_type, count(project_type) AS projects_count').having("count(project_type) > ?", 0)
@project_group_list = projects.group(:project_type).size
# @project_group_list = projects.group(:project_type).select('project_type, count(project_type) AS projects_count').having("count(project_type) > ?", 0)
end
def update