mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
新增:转账记录使用json builder以及贡献者新增贡献占比
This commit is contained in:
@@ -31,11 +31,9 @@ module Watchable
|
||||
following.size
|
||||
end
|
||||
|
||||
def contribution_perc
|
||||
project_identifier = params[:project_identifier]
|
||||
user_login = params[:id]
|
||||
@project = Project.find_by_identifier(project_identifier)
|
||||
@user = User.find_by_login(user_login)
|
||||
def contribution_perc(project)
|
||||
@project = project
|
||||
@user = self
|
||||
|
||||
def cal_perc(count_user, count_all)
|
||||
(count_user * 1.0 / (count_all + 0.000000001)).round(5)
|
||||
|
||||
Reference in New Issue
Block a user