Instructeurs: Changed the filters from 'true/false' to 'oui/non' for yes_no type_de_champ

This commit is contained in:
Judith 2020-06-08 14:33:58 +02:00
parent 72d1ca1f42
commit ad53dfa84d
6 changed files with 142 additions and 23 deletions

View file

@ -167,18 +167,7 @@ module Instructeurs
def add_filter
if params[:value].present?
filters = procedure_presentation.filters
table, column = params[:field].split('/')
label = find_field(table, column)['label']
filters[statut] << {
'label' => label,
'table' => table,
'column' => column,
'value' => params[:value]
}
procedure_presentation.update(filters: filters)
procedure_presentation.add_filter(statut, params[:field], params[:value])
end
redirect_back(fallback_location: instructeur_procedure_url(procedure))