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/commit_status.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/models/commit_status.rb') diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 66eb5dcecf9..06d296eef08 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -33,7 +33,7 @@ # class CommitStatus < ActiveRecord::Base - include CiStatus + include Statuseable self.table_name = 'ci_builds' @@ -81,7 +81,11 @@ class CommitStatus < ActiveRecord::Base end end - delegate :before_sha, :sha, :short_sha, to: :commit, prefix: false + delegate :sha, :short_sha, to: :commit + + def before_sha + commit.before_sha || Gitlab::Git::BLANK_SHA + end def self.stages order_by = 'max(stage_idx)' -- cgit v1.2.1