From b3ff48c9a1d61b22ab4040ebcdc64eeeb797ad44 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 22 Feb 2017 16:35:08 -0600 Subject: Move up delegate calls --- app/models/project_wiki.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/models/project_wiki.rb') 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) -- cgit v1.2.1