summaryrefslogtreecommitdiff
path: root/app/controllers/help_controller.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-13 06:09:09 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-13 06:09:09 +0000
commit8f71e69fdbb65d2cf95cf16ef5a0add0919edb45 (patch)
tree0c282e1224b9ff50ba272b698b92919b72973af9 /app/controllers/help_controller.rb
parentf645d7e060e85cbf442b4e86009bc776688e4661 (diff)
downloadgitlab-ce-8f71e69fdbb65d2cf95cf16ef5a0add0919edb45.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/help_controller.rb')
-rw-r--r--app/controllers/help_controller.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
index 93be0130e12..5a5200452de 100644
--- a/app/controllers/help_controller.rb
+++ b/app/controllers/help_controller.rb
@@ -80,18 +80,17 @@ class HelpController < ApplicationController
def documentation_url
return unless documentation_base_url
- @documentation_url ||= [
- documentation_base_url.chomp('/'),
- version_segment,
- 'ee',
- "#{@path}.html"
- ].compact.join('/')
+ @documentation_url ||= Gitlab::Utils.append_path(documentation_base_url, documentation_file_path)
end
def documentation_base_url
@documentation_base_url ||= Gitlab::CurrentSettings.current_application_settings.help_page_documentation_base_url.presence
end
+ def documentation_file_path
+ @documentation_file_path ||= [version_segment, 'ee', "#{@path}.html"].compact.join('/')
+ end
+
def version_segment
return if Gitlab.pre_release?