diff --git a/app/models/concerns/columns_concern.rb b/app/models/concerns/columns_concern.rb index 01125ab89..3f8e11a52 100644 --- a/app/models/concerns/columns_concern.rb +++ b/app/models/concerns/columns_concern.rb @@ -53,7 +53,7 @@ module ColumnsConcern Column.new(table: 'user', column: 'email'), Column.new(table: 'followers_instructeurs', column: 'email'), Column.new(table: 'groupe_instructeur', column: 'id', type: :enum), - Column.new(table: 'avis', column: 'question_answer', filterable: false) + Column.new(table: 'avis', column: 'question_answer', filterable: false) # not filterable ? ] end diff --git a/app/models/procedure_presentation.rb b/app/models/procedure_presentation.rb index c565c8604..cd935f326 100644 --- a/app/models/procedure_presentation.rb +++ b/app/models/procedure_presentation.rb @@ -241,7 +241,7 @@ class ProcedurePresentation < ApplicationRecord .includes(:followers_instructeurs) .joins('INNER JOIN users instructeurs_users ON instructeurs_users.id = instructeurs.user_id') .filter_ilike('instructeurs_users', :email, values) # ilike OK, user may want to search by *@domain - when 'user', 'individual' # user_columns: [email], individual_columns: ['nom', 'prenom', 'gender'] + when 'user', 'individual' dossiers .includes(table) .filter_ilike(table, column, values) # ilike or where column == 'value' are both valid, we opted for ilike