[#2179] Extract dossier_by_full_text_for_gestionnaire method

This commit is contained in:
Frederic Merizen 2018-07-31 14:32:17 +02:00
parent d734f978a3
commit b3cb06b7e5

View file

@ -5,10 +5,7 @@ class DossierSearchService
# full text search
if dossiers.empty?
dossiers = Search.new(
gestionnaire: gestionnaire,
query: search_terms
).results
dossier = dossier_by_full_text_for_gestionnaire(search_terms, gestionnaire)
end
dossiers
@ -41,4 +38,11 @@ class DossierSearchService
false
end
end
def self.dossier_by_full_text_for_gestionnaire(search_terms, gestionnaire)
Search.new(
gestionnaire: gestionnaire,
query: search_terms
).results
end
end