summaryrefslogtreecommitdiff
path: root/app/helpers/lfs_helper.rb
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-09-26 17:21:38 -0500
committerPatricio Cano <suprnova32@gmail.com>2016-09-26 17:23:00 -0500
commit927ab56c7753b86b0d3efe3bb35573c9caeeb27f (patch)
tree6cd57c90c3ceaf072940d96468d0e3ddd81326c2 /app/helpers/lfs_helper.rb
parentf590e6f1147a9fff5df350df6bae5e33f84d33de (diff)
downloadgitlab-ce-927ab56c7753b86b0d3efe3bb35573c9caeeb27f.tar.gz
Use GitLab Routing helpers for the documentation URL in `LfsHelper`lfs-helper-doc-link
Diffstat (limited to 'app/helpers/lfs_helper.rb')
-rw-r--r--app/helpers/lfs_helper.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers/lfs_helper.rb b/app/helpers/lfs_helper.rb
index c15ecc8f86e..95b60aeab5f 100644
--- a/app/helpers/lfs_helper.rb
+++ b/app/helpers/lfs_helper.rb
@@ -1,11 +1,13 @@
module LfsHelper
+ include Gitlab::Routing.url_helpers
+
def require_lfs_enabled!
return if Gitlab.config.lfs.enabled
render(
json: {
message: 'Git LFS is not enabled on this GitLab server, contact your admin.',
- documentation_url: "#{Gitlab.config.gitlab.url}/help",
+ documentation_url: help_url,
},
status: 501
)
@@ -46,7 +48,7 @@ module LfsHelper
render(
json: {
message: 'Access forbidden. Check your access level.',
- documentation_url: "#{Gitlab.config.gitlab.url}/help",
+ documentation_url: help_url,
},
content_type: "application/vnd.git-lfs+json",
status: 403
@@ -57,7 +59,7 @@ module LfsHelper
render(
json: {
message: 'Not found.',
- documentation_url: "#{Gitlab.config.gitlab.url}/help",
+ documentation_url: help_url,
},
content_type: "application/vnd.git-lfs+json",
status: 404