From bdedaf67cc998b8d443231010a04cbe2e63a2da9 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 24 Mar 2020 14:14:55 -0300 Subject: [PATCH] solo notificar a les usuaries confirmades --- app/jobs/deploy_job.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/jobs/deploy_job.rb b/app/jobs/deploy_job.rb index 85411cb..a115720 100644 --- a/app/jobs/deploy_job.rb +++ b/app/jobs/deploy_job.rb @@ -45,9 +45,8 @@ class DeployJob < ApplicationJob end def notify_usuaries - # TODO: existe site.usuaries_ids? - @site.usuaries.find_each do |usuarie| - DeployMailer.with(usuarie: usuarie.id, site: @site.id) + @site.roles.where(rol: 'usuarie', temporal: false).pluck(:usuaries_id).each do |usuarie| + DeployMailer.with(usuarie: usuarie, site: @site.id) .deployed(@deployed) .deliver_now end