diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-01-24 15:18:47 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-01-25 10:41:46 +0100 |
commit | 2d154cee32a01fd0880594d9635362df13bcdfb1 (patch) | |
tree | ce57ec798f2c5b2bc078ecd207e404d3177b5c11 /app/models/ci/pipeline.rb | |
parent | 287c6ed149991fcb74ee2088c1dcb7beadefc7bf (diff) | |
download | gitlab-ce-2d154cee32a01fd0880594d9635362df13bcdfb1.tar.gz |
Move processables scope into commit status class
Diffstat (limited to 'app/models/ci/pipeline.rb')
-rw-r--r-- | app/models/ci/pipeline.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 014872a2e2a..acef5d2e643 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -25,7 +25,7 @@ module Ci has_many :stages, -> { order(position: :asc) }, inverse_of: :pipeline has_many :statuses, class_name: 'CommitStatus', foreign_key: :commit_id, inverse_of: :pipeline - has_many :processables, -> { where(type: %w[Ci::Build Ci::Bridge]) }, + has_many :processables, -> { processables }, class_name: 'CommitStatus', foreign_key: :commit_id, inverse_of: :pipeline has_many :builds, foreign_key: :commit_id, inverse_of: :pipeline has_many :trigger_requests, dependent: :destroy, foreign_key: :commit_id # rubocop:disable Cop/ActiveRecordDependent |