[#2179] Extract dossier_by_full_text_for_gestionnaire method
This commit is contained in:
parent
d734f978a3
commit
b3cb06b7e5
1 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue