Sha256: 80e7841a8f7430d73524139daecad6dd5a6b9c89405b564fc52f40a148d6bdc8
Contents?: true
Size: 762 Bytes
Versions: 2
Compression:
Stored size: 762 Bytes
Contents
## # Adds sending email through an ActiveRecord table as a delivery method for # ActionMailer. # class ActionMailer::Base ## # Set the email class for deliveries. Handle class reloading issues which prevents caching the email class. # @@email_class_name = 'Email' @@priority = 100 def self.email_class=(klass) @@email_class_name = klass.to_s end def self.email_class @@email_class_name.constantize end ## # Adds +mail+ to the Email table. Only the first From address for +mail+ is # used. def perform_delivery_activerecord(mail) mail.destinations.each do |destination| self.class.email_class.create :mail => mail.encoded, :to => destination, :from => mail.from.first, :priority => @@priority end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
paulnicholson-ar_mailer-2.1.5 | lib/action_mailer/ar_mailer.rb |
paulnicholson-ar_mailer-2.1.6 | lib/action_mailer/ar_mailer.rb |