diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/services/search_service.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) | |
download | gitlab-ce-15.7.0-rc42.tar.gz |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/services/search_service.rb')
-rw-r--r-- | app/services/search_service.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/search_service.rb b/app/services/search_service.rb index f38522b9764..403a2f077b0 100644 --- a/app/services/search_service.rb +++ b/app/services/search_service.rb @@ -45,9 +45,9 @@ class SearchService end def show_snippets? - return @show_snippets if defined?(@show_snippets) - - @show_snippets = params[:snippets] == 'true' + strong_memoize(:show_snippets) do + params[:snippets] == 'true' + end end delegate :scope, to: :search_service |