Module: ExternalWikiHelper

Defined in:
app/helpers/external_wiki_helper.rb

Instance Method Summary collapse

Instance Method Details

#get_project_wiki_path(project) ⇒ Object


2
3
4
5
6
7
8
9
10
# File 'app/helpers/external_wiki_helper.rb', line 2

def get_project_wiki_path(project)
  external_wiki_service = project.services.
    find { |service| service.to_param == 'external_wiki' }
  if external_wiki_service.present? && external_wiki_service.active?
    external_wiki_service.properties['external_wiki_url']
  else
    namespace_project_wiki_path(project.namespace, project, :home)
  end
end