diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-22 16:35:08 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 09:32:42 -0600 |
commit | b3ff48c9a1d61b22ab4040ebcdc64eeeb797ad44 (patch) | |
tree | e73552a1d8f27dd510e0bde264b6d24648fc2bfc /app/models/commit_status.rb | |
parent | 0a5b670a9392f7f8c02e83f1c2e3ed4d2d67cfde (diff) | |
download | gitlab-ce-b3ff48c9a1d61b22ab4040ebcdc64eeeb797ad44.tar.gz |
Move up delegate calls
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index df835b99189..fc750a3e5e9 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -10,6 +10,7 @@ class CommitStatus < ActiveRecord::Base belongs_to :user delegate :commit, to: :pipeline + delegate :sha, :short_sha, to: :pipeline validates :pipeline, presence: true, unless: :importing? @@ -102,8 +103,6 @@ class CommitStatus < ActiveRecord::Base end end - delegate :sha, :short_sha, to: :pipeline - def before_sha pipeline.before_sha || Gitlab::Git::BLANK_SHA end |