diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-07-20 14:27:53 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-07-20 14:27:53 +0300 |
commit | a563f3311399d526bdfbef067c5a4c571acaaed5 (patch) | |
tree | b39728ae0160395b080893a992f690eb9f38146c /app/models/project.rb | |
parent | 66c8c3d4c390f886306c5bc074f9c0b3298f6911 (diff) |
Join on association
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index f2e9d607967..5cfc1d407e4 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -431,7 +431,7 @@ class Project < ActiveRecord::Base # ref can't be HEAD, can only be branch/tag name or SHA def latest_successful_builds_for(ref = default_branch) - Ci::Build.joins(:pipeline).merge(pipelines.latest_successful_for(ref)). + builds.joins(:pipeline).merge(pipelines.latest_successful_for(ref)). latest_successful_with_artifacts end |