fix(dossier): update search terms when etablissement or individual changed

This commit is contained in:
Colin Darie 2024-04-25 17:44:28 +02:00
parent ee465b38ff
commit 4408824882
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
4 changed files with 34 additions and 12 deletions

View file

@ -17,6 +17,8 @@ class Individual < ApplicationRecord
validates :email, presence: true, if: -> { dossier.for_tiers? && self.email? }, on: :update
after_commit -> { dossier.debounce_update_search_terms }, if: -> { nom_previously_changed? || prenom_previously_changed? }
GENDER_MALE = "M."
GENDER_FEMALE = 'Mme'