新增:forks特殊显示逻辑
This commit is contained in:
parent
7fe204056d
commit
c891fcf836
|
@ -24,9 +24,9 @@ class RepositoriesController < ApplicationController
|
||||||
@result = Repositories::DetailService.call(@owner, @repository, @user)
|
@result = Repositories::DetailService.call(@owner, @repository, @user)
|
||||||
cache_total_forks = $redis_cache.get("ProjectSpecialForks:#{@project.id}")
|
cache_total_forks = $redis_cache.get("ProjectSpecialForks:#{@project.id}")
|
||||||
if cache_total_forks.present?
|
if cache_total_forks.present?
|
||||||
@project_forked_count = @project.forked_count.to_i
|
|
||||||
else
|
|
||||||
@project_forked_count = cache_total_forks.to_i
|
@project_forked_count = cache_total_forks.to_i
|
||||||
|
else
|
||||||
|
@project_forked_count = @project.forked_count.to_i
|
||||||
end
|
end
|
||||||
@project_fork_id = @project.try(:forked_from_project_id)
|
@project_fork_id = @project.try(:forked_from_project_id)
|
||||||
if @project_fork_id.present?
|
if @project_fork_id.present?
|
||||||
|
|
Loading…
Reference in New Issue