tech(doc): explain which columns are ilikable for user/individual

This commit is contained in:
mfo 2024-09-24 20:22:39 +02:00
parent 51ce0cd562
commit b30cbf3032
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC

View file

@ -241,7 +241,7 @@ class ProcedurePresentation < ApplicationRecord
.includes(:followers_instructeurs) .includes(:followers_instructeurs)
.joins('INNER JOIN users instructeurs_users ON instructeurs_users.id = instructeurs.user_id') .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 .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 dossiers
.includes(table) .includes(table)
.filter_ilike(table, column, values) # ilike or where column == 'value' are both valid, we opted for ilike .filter_ilike(table, column, values) # ilike or where column == 'value' are both valid, we opted for ilike