diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-25 14:56:23 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-25 14:56:23 +0400 |
commit | 4b65b0e0f5804492e90c3ee8037739c47bcc354b (patch) | |
tree | 700b172cc1402fd7aeab11eb13f7e6e69ed0276d /app/models/project_wiki.rb | |
parent | b13c1469a317a36a72e87fa92972e440fc8438e5 (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.rb | 12 |
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! |