Class | EmailMessage |
In: |
app/models/email_message.rb
|
Parent: | ActiveRecord::Base |
# File app/models/email_message.rb, line 13 13: def self.deliver! 14: # Send all messages, 100 at a time 15: undelivered.all(:limit => 100).each do |m| 16: m.deliver! 17: end 18: end
# File app/models/email_message.rb, line 25 25: def deliver! 26: return false if delivered? 27: EmailMessageMailer.deliver_email_message(self) 28: update_attributes(:delivered_at => Time.now) 29: end
TODO: Take this out when we have an email queue processor
# File app/models/email_message.rb, line 21 21: def deliver_now 22: deliver! 23: end