refactoring

This commit is contained in:
Oleg Hasjanov 2021-04-15 14:44:46 +03:00
parent f3612fc1e4
commit f0de396e82

View file

@ -4,7 +4,7 @@ class BouncedEmailsCleanerJob < ApplicationJob
def perform def perform
BouncedMailAddress.find_each do |bounce| BouncedMailAddress.find_each do |bounce|
count = Contact.where(email: bounce.email).count count = Contact.where(email: bounce.email).count
bounce.destroy if count == 0 bounce.destroy if count.zero?
end end
end end
end end