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:
authorDylan Griffith <dyl.griffith@gmail.com>2018-05-02 18:43:20 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-02 18:43:20 +0300
commit0970e7b9608d6ada1c0fe45242ea092ea91068aa (patch)
tree79b16801413032e669f8369ee111561f152ff923 /app/models/namespace.rb
parent2261188f48dff25c5bfbbca739c5f570849155f4 (diff)
Rename RunnerGroup -> RunnerNamespace
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index c29a53e5ce7..5621eeba7c4 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -21,6 +21,9 @@ class Namespace < ActiveRecord::Base
has_many :projects, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
has_many :project_statistics
+ has_many :runner_namespaces, class_name: 'Ci::RunnerNamespace'
+ has_many :runners, through: :runner_namespaces, source: :runner, class_name: 'Ci::Runner'
+
# This should _not_ be `inverse_of: :namespace`, because that would also set
# `user.namespace` when this user creates a group with themselves as `owner`.
belongs_to :owner, class_name: "User"