修改分类移除匿名用户的项目

This commit is contained in:
sylor_huang@126.com 2020-04-21 19:05:33 +08:00
parent f07a10ad99
commit 718be42d78
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ class ProjectCategoriesController < ApplicationController
if current_user&.logged? if current_user&.logged?
projects = Project.list_user_projects(current_user.id) projects = Project.list_user_projects(current_user.id)
else else
projects = Project.visible projects = Project.no_anomory_projects.visible
end end
@category_group_list = projects.joins(:project_category).group("project_categories.id", "project_categories.name").size @category_group_list = projects.joins(:project_category).group("project_categories.id", "project_categories.name").size
end end

View File

@ -51,7 +51,7 @@ class ProjectsController < ApplicationController
if current_user&.logged? if current_user&.logged?
projects = Project.list_user_projects(current_user.id) projects = Project.list_user_projects(current_user.id)
else else
projects = Project.visible projects = Project.no_anomory_projects.visible
end end
# projects = Project.visible # projects = Project.visible
@project_group_list = projects.group(:project_type).size @project_group_list = projects.group(:project_type).size