diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-02 17:43:20 +0200 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-02 17:43:20 +0200 |
commit | 0970e7b9608d6ada1c0fe45242ea092ea91068aa (patch) | |
tree | 79b16801413032e669f8369ee111561f152ff923 /app/models/namespace.rb | |
parent | 2261188f48dff25c5bfbbca739c5f570849155f4 (diff) | |
download | gitlab-ce-0970e7b9608d6ada1c0fe45242ea092ea91068aa.tar.gz |
Rename RunnerGroup -> RunnerNamespace
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 3 |
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" |