Fix unsubscriber get mail bug.
This commit is contained in:
parent
8c6a48acb0
commit
9f94440cdc
|
@ -12,7 +12,7 @@ namespace :epaper do
|
|||
domain = args[:domain]
|
||||
if !paper.nil?
|
||||
email_format = /^[A-Za-z0-9+_.-]+@[A-Za-z0-9.-]+$/
|
||||
subscribers = EPaperSubscriber.where(:language.in=>paper.language_to_send,:email.nin=>['',nil])
|
||||
subscribers = EPaperSubscriber.where(:language.in=>paper.language_to_send,:email.nin=>['',nil],:subscribed.ne=>false)
|
||||
subscribers.update_all(:last_paper_sent => paper.id.to_s)
|
||||
emails = subscribers.collect(&:email)
|
||||
site = Site.first
|
||||
|
|
Loading…
Reference in New Issue