Displaying 1 result from an estimated 1 matches for "newsletterjob".
2011 Jan 06
1
Send email with delayed job
Hi,
I want to send email with delayed job.
In order to do so, I have a Notifier model with X methods sending
different type of emails.
In the documentation, they suggest to send email like this:
class NewsletterJob < Struct.new(:text, :emails)
def perform
emails.each { |e| NewsletterMailer.deliver_text_to_email(text, e)
}
end
end
But in my notifier model I have X methods, does it mean I have to create
a different Struc for each methods?
Greg
--
Posted via http://www.ruby-forum.com/.
-...