debian-mirror-gitlab/app/services/search/snippet_service.rb

16 lines
323 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2015-04-26 12:48:37 +05:30
module Search
2019-12-21 20:55:43 +05:30
class SnippetService < Search::GlobalService
2015-04-26 12:48:37 +05:30
def execute
2019-12-21 20:55:43 +05:30
Gitlab::SnippetSearchResults.new(current_user, params[:search])
2015-04-26 12:48:37 +05:30
end
2017-08-17 22:00:37 +05:30
def scope
2020-05-24 23:13:21 +05:30
@scope ||= 'snippet_titles'
2017-08-17 22:00:37 +05:30
end
2015-04-26 12:48:37 +05:30
end
end
2019-12-04 20:38:33 +05:30
Search::SnippetService.prepend_if_ee('::EE::Search::SnippetService')