diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-05-21 12:39:46 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-05-21 16:13:32 +0300 |
commit | 631bd9bf082c396059867d512fcfbdc80445c65e (patch) | |
tree | 65f5c54174b5cf75d9bf0dd660ca4ac7a9585c1b /app/models/ci/pipeline.rb | |
parent | b113330fab21d3da547cbee057b825f2225676c6 (diff) |
Use persisted stages to load pipelines index table
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 c26f0b6dcdc..e7569e0d31e 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -13,7 +13,7 @@ module Ci belongs_to :auto_canceled_by, class_name: 'Ci::Pipeline' belongs_to :pipeline_schedule, class_name: 'Ci::PipelineSchedule' - has_many :stages + has_many :stages, inverse_of: :pipeline # -> { order(position: :asc) }, inverse_of: :pipeline has_many :statuses, 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 |