Welcome to mirror list, hosted at ThFree Co, Russian Federation.

external_wiki_helper.rb « helpers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 838b85afdfe573e1d605c784fe47b35731aa9894 (plain)
1
2
3
4
5
6
7
8
9
10
11
module ExternalWikiHelper
  def get_project_wiki_path(project)
    external_wiki_service = project.services.
      select { |service| service.to_param == 'external_wiki' }.first
    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
end