Join on association
This commit is contained in:
parent
66c8c3d4c3
commit
a563f33113
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue