Browse Source

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

tags/v1
sylor_huang@126.com 6 years ago
parent
commit
718be42d78
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/controllers/project_categories_controller.rb
  2. +1
    -1
      app/controllers/projects_controller.rb

+ 1
- 1
app/controllers/project_categories_controller.rb View File

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


+ 1
- 1
app/controllers/projects_controller.rb View File

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


Loading…
Cancel
Save