debian-mirror-gitlab/app/services/search/snippet_service.rb
2021-06-08 01:23:25 +05:30

15 lines
320 B
Ruby

# frozen_string_literal: true
module Search
class SnippetService < Search::GlobalService
def execute
Gitlab::SnippetSearchResults.new(current_user, params[:search])
end
def scope
@scope ||= 'snippet_titles'
end
end
end
Search::SnippetService.prepend_mod_with('Search::SnippetService')