Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-10-13 20:21:23 +0300
committerShinya Maeda <shinya@gitlab.com>2017-10-23 08:57:52 +0300
commite1d12ba9b988e61afb9317f3a132d6e2caa93923 (patch)
tree2f68e95ed04d538dd0b4ddae338400b8af53379a /app/models/project.rb
parentc4cbf115db1ca719b97677057b984672a0900bf8 (diff)
Refactor Clusters to be consisted from GcpProvider and KubernetesPlatform
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 4689b588906..bc263b63881 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -177,7 +177,9 @@ class Project < ActiveRecord::Base
has_one :import_data, class_name: 'ProjectImportData', inverse_of: :project, autosave: true
has_one :project_feature, inverse_of: :project
has_one :statistics, class_name: 'ProjectStatistics'
- has_one :cluster, class_name: 'Gcp::Cluster', inverse_of: :project
+
+ has_many :cluster_projects, class_name: 'Clusters::ClusterProject'
+ has_one :cluster, through: :cluster_projects
# Container repositories need to remove data from the container registry,
# which is not managed by the DB. Hence we're still using dependent: :destroy