From 660e1abd63c8b2f05c4f4fceace857d1d9dc286d Mon Sep 17 00:00:00 2001 From: Miklos Fazkeas Date: Mon, 8 Dec 2014 10:26:09 +0100 Subject: Fixes to inaccurate documentation in action_mailer [ci skip] --- actionmailer/lib/action_mailer/base.rb | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 021a758940..fbe8cd4197 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: # # Notifier.welcome(User.first).deliver_now # sends the email # mail = Notifier.welcome(User.first) # => an ActionMailer::MessageDelivery object - # mail.deliver_now # sends the email + # mail.deliver_now # generates and sends the email now # - # The ActionMailer::MessageDelivery class is a wrapper around a Mail::Message object. If - # you want direct access to the Mail::Message object you can call the message method on - # the ActionMailer::MessageDelivery object. + # The ActionMailer::MessageDelivery class is a wrapper around a delegate that will call + # your method to generate the mail. If you want direct access to Mail::Message you can + # call the message method on the ActionMailer::MessageDelivery object. # # Notifier.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): # # Notifier.welcome(User.first).deliver_later # enqueue the email sending to Active Job # + # Note that deliver_later 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 # -- cgit v1.2.3 From a647277fb9172f8434d961e6fa3b90f234b67c4e Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Sun, 12 Apr 2015 13:29:58 -0700 Subject: Since the delegator wasn't identified earlier, we should here [ci skip] --- actionmailer/lib/action_mailer/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 15f62a563f..6ddc4c9596 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -142,8 +142,8 @@ module ActionMailer # mail.deliver_now # generates and sends the email now # # The ActionMailer::MessageDelivery class is a wrapper around a delegate that will call - # your method to generate the mail. If you want direct access to Mail::Message you can - # call the message method on the ActionMailer::MessageDelivery object. + # your method to generate the mail. If you want direct access to delegator, or Mail::Message, + # you can call the message method on the ActionMailer::MessageDelivery object. # # NotifierMailer.welcome(User.first).message # => a Mail::Message object # -- cgit v1.2.3