Permalink
Browse files

AsyncMailer documention

  • Loading branch information...
1 parent dc7fd82 commit 0cb154be245f15708a126f49b46ac6cd7f08ea73 @bcardarella bcardarella committed Jun 23, 2012
Showing with 3 additions and 0 deletions.
  1. +2 −0 actionmailer/lib/action_mailer/async.rb
  2. +1 −0 actionmailer/lib/action_mailer/base.rb
@@ -26,10 +26,12 @@ def run
actual_message.deliver
end
+ # Will push the message onto the Queue to be processed
def deliver
Rails.queue << self
end
+ # The original ActionMailer message
def actual_message
@actual_message ||= @mailer_class.send(:new, @method_name, *@args).message
end
@@ -456,6 +456,7 @@ def respond_to?(method, include_private = false) #:nodoc:
super || action_methods.include?(method.to_s)
end
+ # Will force ActionMailer to push new messages to the Rails.queue
def async=(truth)
if truth
require 'action_mailer/async'

0 comments on commit 0cb154b

Please sign in to comment.