Fix bug.
This commit is contained in:
parent
55b30b3dae
commit
f9a411ae60
|
@ -1,4 +1,5 @@
|
||||||
<% paper = @data["paper"] %>
|
<% paper = PaperCriteria.find(@data["paper_id"]) rescue nil %>
|
||||||
|
<% paper = @data["paper"] if paper.nil? && @data["paper"] != nil %>
|
||||||
<% page = @data["page"] %>
|
<% page = @data["page"] %>
|
||||||
<% siteurl = @data["siteurl"] %>
|
<% siteurl = @data["siteurl"] %>
|
||||||
<% papers_data = @data["papers_data"] %>
|
<% papers_data = @data["papers_data"] %>
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace :epaper do
|
||||||
Thread.new do
|
Thread.new do
|
||||||
tmp = []
|
tmp = []
|
||||||
emails_valid.each_slice(mail_limit).each do |slice_emails|
|
emails_valid.each_slice(mail_limit).each do |slice_emails|
|
||||||
email = Email.new(:mail_subject => paper.sending_title, :mail_lang => args[:locale], :template => "admin/e_paper_criterias/emailer", :template_data => {"paper" => paper, "page" => "http://" + domain + page, "siteurl" => "http://" + domain, "papers_data" => papers_data }, :mail_to => slice_emails)
|
email = Email.new(:mail_subject => paper.sending_title, :mail_lang => args[:locale], :template => "admin/e_paper_criterias/emailer", :template_data => {"paper_id" => paper.id, "page" => "http://" + domain + page, "siteurl" => "http://" + domain, "papers_data" => papers_data }, :mail_to => slice_emails.join(","))
|
||||||
begin
|
begin
|
||||||
email.save
|
email.save
|
||||||
email.deliver
|
email.deliver
|
||||||
|
|
Loading…
Reference in New Issue