Commit dd6b16a1 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Use latest_for in latest_successful_for

parent 721f2d37
...@@ -105,7 +105,7 @@ module Ci ...@@ -105,7 +105,7 @@ module Ci
end end
def self.latest_successful_for(ref) def self.latest_successful_for(ref)
where(ref: ref).order(id: :desc).success.first latest_for(ref).success.first
end end
def self.truncate_sha(sha) def self.truncate_sha(sha)
......
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