From b30cbf3032cdf6536deef777c9ac907b303f6482 Mon Sep 17 00:00:00 2001 From: mfo Date: Tue, 24 Sep 2024 20:22:39 +0200 Subject: [PATCH] tech(doc): explain which columns are ilikable for user/individual --- app/models/procedure_presentation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/procedure_presentation.rb b/app/models/procedure_presentation.rb index cd935f326..c565c8604 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' + when 'user', 'individual' # user_columns: [email], individual_columns: ['nom', 'prenom', 'gender'] dossiers .includes(table) .filter_ilike(table, column, values) # ilike or where column == 'value' are both valid, we opted for ilike