summaryrefslogtreecommitdiff
path: root/app/models/project_wiki.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-22 16:35:08 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-23 09:32:42 -0600
commitb3ff48c9a1d61b22ab4040ebcdc64eeeb797ad44 (patch)
treee73552a1d8f27dd510e0bde264b6d24648fc2bfc /app/models/project_wiki.rb
parent0a5b670a9392f7f8c02e83f1c2e3ed4d2d67cfde (diff)
downloadgitlab-ce-b3ff48c9a1d61b22ab4040ebcdc64eeeb797ad44.tar.gz
Move up delegate calls
Diffstat (limited to 'app/models/project_wiki.rb')
-rw-r--r--app/models/project_wiki.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb
index 2f55b853232..9891f5edf41 100644
--- a/app/models/project_wiki.rb
+++ b/app/models/project_wiki.rb
@@ -19,6 +19,9 @@ class ProjectWiki
@user = user
end
+ delegate :empty?, to: :pages
+ delegate :repository_storage_path, to: :project
+
def path
@project.path + '.wiki'
end
@@ -60,8 +63,6 @@ class ProjectWiki
!!repository.exists?
end
- delegate :empty?, to: :pages
-
# Returns an Array of Gitlab WikiPage instances or an
# empty Array if this Wiki has no pages.
def pages
@@ -158,8 +159,6 @@ class ProjectWiki
}
end
- delegate :repository_storage_path, to: :project
-
private
def init_repo(path_with_namespace)