From 0b1655e7b2e2aa57cb7ea8401743d709bf246074 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sat, 16 Apr 2016 21:46:26 +0200 Subject: Rename CiStatus to Statusable --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/project.rb') diff --git a/app/models/project.rb b/app/models/project.rb index 95eb7c51b80..3a55e6c5dd6 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -958,7 +958,7 @@ class Project < ActiveRecord::Base end def ci_commit(sha, ref) - ci_commits.find_by(sha: sha, ref: ref) + ci_commits.order(id: :desc).find_by(sha: sha, ref: ref) end def ensure_ci_commit(sha, ref) -- cgit v1.2.1