diff --git a/lib/tasks/e_paper_tasks.rake b/lib/tasks/e_paper_tasks.rake index e209118..868d33a 100644 --- a/lib/tasks/e_paper_tasks.rake +++ b/lib/tasks/e_paper_tasks.rake @@ -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