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:
authorBob Van Landuyt <bob@gitlab.com>2017-04-11 17:21:52 +0300
committerBob Van Landuyt <bob@gitlab.com>2017-05-01 12:14:24 +0300
commit1498a9cb0fb4500737c9d9e88f38c0ddf2b42791 (patch)
tree26e0497c62b9396a658b68f422b89c486763b157 /app/models/namespace.rb
parentf7511caa5f26c071c61908a48440a95c5f45eb69 (diff)
Check `has_parent?` for determining validation type
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 9bfa731785f..1570470d63f 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -220,6 +220,10 @@ class Namespace < ActiveRecord::Base
Project.inside_path(full_path)
end
+ def has_parent?
+ parent.present?
+ end
+
private
def repository_storage_paths