diff options
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 599bedde27d..4a6627d3ca1 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -83,7 +83,7 @@ class Namespace < ActiveRecord::Base find_by('lower(path) = :value', value: path.downcase) end - # Case insensetive search for namespace by path or name + # Case insensitive search for namespace by path or name def find_by_path_or_name(path) find_by("lower(path) = :path OR lower(name) = :path", path: path.downcase) end @@ -232,6 +232,12 @@ class Namespace < ActiveRecord::Base Project.inside_path(full_path) end + # Includes pipelines from this namespace and pipelines from all subgroups + # that belongs to this namespace + def all_pipelines + Ci::Pipeline.where(project: all_projects) + end + def has_parent? parent.present? end |