Commit a563f331 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Join on association

parent b2a8f0fc445e
......@@ -431,7 +431,7 @@ def commit(ref = 'HEAD')
# 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment