clean(filter): avis column are not filterable, not needed to ilike them
This commit is contained in:
parent
284bdc5b2b
commit
51ce0cd562
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue