We could just sum with SQL
This commit is contained in:
parent
47ed793af9
commit
7d9bdac6ce
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ module Ci
|
|||
end
|
||||
|
||||
def self.duration
|
||||
where.not(duration: nil).pluck(:duration).inject(0, &:+)
|
||||
where.not(duration: nil).sum(:duration)
|
||||
end
|
||||
|
||||
def project_id
|
||||
|
|
Loading…
Reference in a new issue