diff options
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 |