mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 22:54:47 +02:00
refactoring
This commit is contained in:
parent
f3612fc1e4
commit
f0de396e82
1 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ class BouncedEmailsCleanerJob < ApplicationJob
|
|||
def perform
|
||||
BouncedMailAddress.find_each do |bounce|
|
||||
count = Contact.where(email: bounce.email).count
|
||||
bounce.destroy if count == 0
|
||||
end
|
||||
bounce.destroy if count.zero?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue