summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-03 14:46:17 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-03 14:46:17 +0200
commit4d5f7aa00827f425dd3d2c3bd5a395c8e948f0ba (patch)
treedc5446ac09424f48cd5b59df67ab7059ac60aa49 /app
parentbcd009e661291554cffe404123de629860519602 (diff)
downloadgitlab-ce-4d5f7aa00827f425dd3d2c3bd5a395c8e948f0ba.tar.gz
Fix more places where we should rename ci_commit to pipeline
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/pipeline.rb2
-rw-r--r--app/models/ci/trigger_request.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 92fc7c89bd4..9352c6f325a 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -8,7 +8,7 @@ module Ci
belongs_to :project, class_name: '::Project', foreign_key: :gl_project_id
has_many :statuses, class_name: 'CommitStatus', foreign_key: :commit_id
has_many :builds, class_name: 'Ci::Build', foreign_key: :commit_id
- has_many :trigger_requests, dependent: :destroy, class_name: 'Ci::TriggerRequest'
+ has_many :trigger_requests, dependent: :destroy, class_name: 'Ci::TriggerRequest', foreign_key: :commit_id
validates_presence_of :sha
validates_presence_of :status
diff --git a/app/models/ci/trigger_request.rb b/app/models/ci/trigger_request.rb
index 47632c4b40a..59fc9951d11 100644
--- a/app/models/ci/trigger_request.rb
+++ b/app/models/ci/trigger_request.rb
@@ -3,7 +3,7 @@ module Ci
extend Ci::Model
belongs_to :trigger, class_name: 'Ci::Trigger'
- belongs_to :commit, class_name: 'Ci::Pipeline'
+ belongs_to :commit, class_name: 'Ci::Pipeline', foreign_key: :commit_id
has_many :builds, class_name: 'Ci::Build'
serialize :variables