This commit is contained in:
Adrian Hinz 2019-04-06 23:01:10 +02:00
parent cfb3f8f15b
commit 5635e2470b
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ class SendNewsletterJob < ApplicationJob
queue_as :default
def perform
emails = Email.all
emails = Email.where('sended = 0')
emails.each do |em|
NewsletterMailer.news_mail(em.email).deliver
em.sended = true