Fix out of ranch error on search
This commit is contained in:
parent
461fe22a91
commit
4c2dd0ede1
2 changed files with 3 additions and 2 deletions
|
@ -37,7 +37,8 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
|
||||||
@search_terms = params[:q]
|
@search_terms = params[:q]
|
||||||
|
|
||||||
# exact id match?
|
# exact id match?
|
||||||
@dossiers = Dossier.where(id: @search_terms)
|
@dossiers = Dossier.where(id: @search_terms.to_i) if @search_terms.to_i < 2147483647
|
||||||
|
@dossiers = Dossier.none if @dossiers.nil?
|
||||||
|
|
||||||
# full text search
|
# full text search
|
||||||
unless @dossiers.any?
|
unless @dossiers.any?
|
||||||
|
|
|
@ -15,5 +15,5 @@
|
||||||
#procedure_list
|
#procedure_list
|
||||||
- @facade_data_view.gestionnaire_procedures_name_and_id_list.each do |procedure|
|
- @facade_data_view.gestionnaire_procedures_name_and_id_list.each do |procedure|
|
||||||
= link_to backoffice_dossiers_procedure_path(procedure[:id]), {title: procedure[:libelle]} do
|
= link_to backoffice_dossiers_procedure_path(procedure[:id]), {title: procedure[:libelle]} do
|
||||||
%div.procedure_list_element{ class: ('active' if procedure[:id] == @facade_data_view.procedure.id) }
|
%div.procedure_list_element{ class: ('active' if procedure[:id] == @facade_data_view.procedure.id rescue '') }
|
||||||
= truncate(procedure[:libelle], length: 50)
|
= truncate(procedure[:libelle], length: 50)
|
||||||
|
|
Loading…
Reference in a new issue