diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-16 21:46:26 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-16 21:46:26 +0200 |
commit | 0b1655e7b2e2aa57cb7ea8401743d709bf246074 (patch) | |
tree | 0f2846f32aec86f3d44300649b0c77f179bec0c4 /app/models/commit_status.rb | |
parent | 065e0c0fe4e5e16b90c01736721e4c794b71dac9 (diff) | |
download | gitlab-ce-0b1655e7b2e2aa57cb7ea8401743d709bf246074.tar.gz |
Rename CiStatus to Statusable
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 8 |
1 files changed, 6 insertions, 2 deletions
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)' |