demarches-normaliennes/app/controllers/new_gestionnaire/recherche_controller.rb

13 lines
411 B
Ruby
Raw Normal View History

2017-07-31 11:58:52 +02:00
module NewGestionnaire
2017-11-22 09:56:36 +01:00
class RechercheController < GestionnaireController
2017-07-31 11:58:52 +02:00
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
2017-07-31 11:58:52 +02:00
end
end