aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Scott <e@zzak.io>2015-04-12 13:28:10 -0700
committerZachary Scott <e@zzak.io>2015-04-12 13:28:10 -0700
commit1ffd603712e9bab3ff17bb712f0c979ab8c0901b (patch)
tree4b2c901663489440a7c17bb3bb7ae33a44795819
parent08a3baa380f9f5189f50abecba657de2d5659845 (diff)
parent660e1abd63c8b2f05c4f4fceace857d1d9dc286d (diff)
downloadrails-1ffd603712e9bab3ff17bb712f0c979ab8c0901b.tar.gz
rails-1ffd603712e9bab3ff17bb712f0c979ab8c0901b.tar.bz2
rails-1ffd603712e9bab3ff17bb712f0c979ab8c0901b.zip
Merge branch 'action-mailer-async-doc-fixes' of https://github.com/mfazekas/rails into mfazekas-action-mailer-async-doc-fixes
Conflicts: actionmailer/lib/action_mailer/base.rb
-rw-r--r--actionmailer/lib/action_mailer/base.rb19
1 files changed, 11 insertions, 8 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index c7f09ed192..15f62a563f 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -134,25 +134,28 @@ module ActionMailer
#
# = Sending mail
#
- # Once a mailer action and template are defined, you can deliver your message or create it and save it
- # for delivery later:
+ # Once a mailer action and template are defined, you can deliver your message or defer its creation and
+ # delivery for later:
#
# NotifierMailer.welcome(User.first).deliver_now # sends the email
# mail = NotifierMailer.welcome(User.first) # => an ActionMailer::MessageDelivery object
- # mail.deliver_now # sends the email
+ # mail.deliver_now # generates and sends the email now
#
- # The <tt>ActionMailer::MessageDelivery</tt> class is a wrapper around a <tt>Mail::Message</tt> object. If
- # you want direct access to the <tt>Mail::Message</tt> object you can call the <tt>message</tt> method on
- # the <tt>ActionMailer::MessageDelivery</tt> object.
+ # The <tt>ActionMailer::MessageDelivery</tt> class is a wrapper around a delegate that will call
+ # your method to generate the mail. If you want direct access to <tt>Mail::Message</tt> you can
+ # call the <tt>message</tt> method on the <tt>ActionMailer::MessageDelivery</tt> object.
#
# NotifierMailer.welcome(User.first).message # => a Mail::Message object
#
- # Action Mailer is nicely integrated with Active Job so you can send emails in the background (example: outside
- # of the request-response cycle, so the user doesn't have to wait on it):
+ # Action Mailer is nicely integrated with Active Job so you can generate and send emails in the background
+ # (example: outside of the request-response cycle, so the user doesn't have to wait on it):
#
# NotifierMailer.welcome(User.first).deliver_later # enqueue the email sending to Active Job
#
+ # Note that <tt>deliver_later</tt> will execute your method from the background job.
+ #
# You never instantiate your mailer class. Rather, you just call the method you defined on the class itself.
+ # All instance method are expected to return a message object to be sent.
#
# = Multipart Emails
#