demarches-normaliennes/app/controllers/gestionnaires/recherche_controller.rb
2019-03-26 10:48:59 +01:00

12 lines
409 B
Ruby

module Gestionnaires
class RechercheController < GestionnaireController
def index
@search_terms = params[:q]
@dossiers = DossierSearchService.matching_dossiers_for_gestionnaire(@search_terms, current_gestionnaire)
@followed_dossiers_id = current_gestionnaire
.followed_dossiers
.where(procedure_id: @dossiers.pluck(:procedure_id))
.pluck(:id)
end
end
end