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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-02-08 21:45:19 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-02-08 21:45:19 +0300
commit8820f3cdd2b04735f7c09b914ebaf186d2b9331d (patch)
tree541be27f62ebe75a8a4f332cec453b95e65da72c /app/models/namespace.rb
parent66f9476a3740167c28a3fcf55f89c76653d829a4 (diff)
parent2989192d1aa8051aa09164cd097418bd3063d4ad (diff)
Merge branch 'dz-refactor-full-path' into 'master'
Store group and project full name and full path in routes table See merge request !8979
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb25
1 files changed, 4 insertions, 21 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 8352565da1c..6de4d08fc28 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -177,27 +177,10 @@ class Namespace < ActiveRecord::Base
Gitlab.config.lfs.enabled
end
- def full_path
- if parent
- parent.full_path + '/' + path
- else
- path
- end
- end
-
def shared_runners_enabled?
projects.with_shared_runners.any?
end
- def full_name
- @full_name ||=
- if parent
- parent.full_name + ' / ' + name
- else
- name
- end
- end
-
# Scopes the model on ancestors of the record
def ancestors
if parent_id
@@ -224,6 +207,10 @@ class Namespace < ActiveRecord::Base
[owner_id]
end
+ def parent_changed?
+ parent_id_changed?
+ end
+
private
def repository_storage_paths
@@ -262,10 +249,6 @@ class Namespace < ActiveRecord::Base
find_each(&:refresh_members_authorized_projects)
end
- def full_path_changed?
- path_changed? || parent_id_changed?
- end
-
def remove_exports!
Gitlab::Popen.popen(%W(find #{export_path} -not -path #{export_path} -delete))
end