fixed 精选项目不包含私有仓库
This commit is contained in:
parent
99850e45ad
commit
27fae8d27b
|
@ -1,7 +1,10 @@
|
||||||
class Users::IsPinnedProjectsController < Users::BaseController
|
class Users::IsPinnedProjectsController < Users::BaseController
|
||||||
before_action :private_user_resources!, only: [:pin]
|
before_action :private_user_resources!, only: [:pin]
|
||||||
def index
|
def index
|
||||||
@is_pinned_projects = observed_user.pinned_projects.order(position: :desc, created_at: :asc).includes(project: [:project_category, :project_language, :repository]).order(position: :desc)
|
@is_pinned_projects = observed_user.pinned_projects.left_joins(:project)
|
||||||
|
.where("projects.is_public = TRUE")
|
||||||
|
.order(position: :desc, created_at: :asc)
|
||||||
|
.includes(project: [:project_category, :project_language, :repository]).order(position: :desc)
|
||||||
@is_pinned_projects = kaminari_paginate(@is_pinned_projects)
|
@is_pinned_projects = kaminari_paginate(@is_pinned_projects)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue