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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-29 06:09:57 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-29 06:09:57 +0300
commitf574f9a14bb6448935fd27a67fc9f3ca61ffcc86 (patch)
treea4df208cf57f3642bbef9acd1ec5e23855484321 /app/helpers/search_helper.rb
parenta111182345afb4625cf044ca829f946c7fc3d8a6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r--app/helpers/search_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index fc1bf4e38d7..8fc9f5ca6fd 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -86,6 +86,11 @@ module SearchHelper
}).html_safe
end
+ def repository_ref(project)
+ # Always #to_s the repository_ref param in case the value is also a number
+ params[:repository_ref].to_s.presence || project.default_branch
+ end
+
# Overridden in EE
def search_blob_title(project, path)
path