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>2014-09-25 14:56:23 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-25 14:56:23 +0400
commit4b65b0e0f5804492e90c3ee8037739c47bcc354b (patch)
tree700b172cc1402fd7aeab11eb13f7e6e69ed0276d /app/models/project_wiki.rb
parentb13c1469a317a36a72e87fa92972e440fc8438e5 (diff)
Fix wiki
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/project_wiki.rb')
-rw-r--r--app/models/project_wiki.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb
index a82a300a672..770a26ed894 100644
--- a/app/models/project_wiki.rb
+++ b/app/models/project_wiki.rb
@@ -107,6 +107,18 @@ class ProjectWiki
[title.gsub(/\.[^.]*$/, ""), title_array.join("/")]
end
+ def search_files(query)
+ repository.search_files(query, default_branch)
+ end
+
+ def repository
+ Repository.new(path_with_namespace, default_branch)
+ end
+
+ def default_branch
+ wiki.class.default_ref
+ end
+
private
def create_repo!