From 3444c4e021e007ad75e384f64cb5c0922ec39cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Erik=20=C3=95unapuu?= Date: Tue, 3 Nov 2020 16:14:01 +0200 Subject: [PATCH] Add registrar poll message after updateing registrant contact(s) names --- app/models/registrant_user.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/registrant_user.rb b/app/models/registrant_user.rb index 089292917..aa41ccff8 100644 --- a/app/models/registrant_user.rb +++ b/app/models/registrant_user.rb @@ -58,7 +58,11 @@ class RegistrantUser < User contacts = Contact.where(ident: ident, ident_country_code: country.alpha2) .where('UPPER(name) != UPPER(?)', username) - contacts.each { |c| c.update(name: username) } + contacts.each do |contact| + contact.update(name: username) + action = actions.create!(contact: contact, operation: :update) + contact.registrar.notify(action) + end end class << self