summaryrefslogtreecommitdiff
path: root/app/presenters/snippet_blob_presenter.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /app/presenters/snippet_blob_presenter.rb
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
downloadgitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/presenters/snippet_blob_presenter.rb')
-rw-r--r--app/presenters/snippet_blob_presenter.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/presenters/snippet_blob_presenter.rb b/app/presenters/snippet_blob_presenter.rb
index abe95f5c44d..597ef6ebc39 100644
--- a/app/presenters/snippet_blob_presenter.rb
+++ b/app/presenters/snippet_blob_presenter.rb
@@ -25,10 +25,6 @@ class SnippetBlobPresenter < BlobPresenter
private
- def snippet_multiple_files?
- blob.container.repository_exists? && Feature.enabled?(:snippet_multiple_files, current_user)
- end
-
def snippet
blob.container
end
@@ -52,8 +48,8 @@ class SnippetBlobPresenter < BlobPresenter
end
def snippet_blob_raw_route(only_path: false)
- return gitlab_raw_snippet_blob_url(snippet, blob.path, only_path: only_path) if snippet_multiple_files?
+ return gitlab_raw_snippet_url(snippet, only_path: only_path) unless snippet.repository_exists?
- gitlab_raw_snippet_url(snippet, only_path: only_path)
+ gitlab_raw_snippet_blob_url(snippet, blob.path, only_path: only_path)
end
end