diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-29 06:09:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-29 06:09:57 +0300 |
commit | f574f9a14bb6448935fd27a67fc9f3ca61ffcc86 (patch) | |
tree | a4df208cf57f3642bbef9acd1ec5e23855484321 /app/helpers/search_helper.rb | |
parent | a111182345afb4625cf044ca829f946c7fc3d8a6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r-- | app/helpers/search_helper.rb | 5 |
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 |