修改组织首页不显示私有项目
This commit is contained in:
parent
69eecf49d1
commit
5340ad7fc1
|
@ -28,7 +28,8 @@ class WelcomeController < ApplicationController
|
|||
# 企业版定制: params[:project]为传过来的参数
|
||||
unless params[:organization].nil?
|
||||
@organization = Organization.find params[:organization]
|
||||
@organization_projects = Project.visible.joins(:project_status).joins("LEFT JOIN project_scores ON projects.id = project_scores.project_id").where("projects.organization_id = ?", @organization.id).order("score DESC").limit(10).all
|
||||
# @organization_projects = Project.joins(:project_status).joins("LEFT JOIN project_scores ON projects.id = project_scores.project_id").where("projects.organization_id = ?", @organization.id).order("score DESC").limit(10).all
|
||||
@organization_projects = @organization.projects.visible.joins("LEFT JOIN project_scores ON projects.id = project_scores.project_id").order("project_scores.score DESC").limit(10).all
|
||||
@part_projects = @organization_projects.count < 9 ? find_miracle_project( 9 - @organization_projects.count, 3,"score desc") : []
|
||||
# @cur_projects = Project.find(params[:organization])
|
||||
# @organization = @cur_projects.enterprise_name
|
||||
|
|
Loading…
Reference in New Issue