diff --git a/actionmailer/lib/action_mailer/message_delivery.rb b/actionmailer/lib/action_mailer/message_delivery.rb index a2ea45dc7b1..2377aeb9a58 100644 --- a/actionmailer/lib/action_mailer/message_delivery.rb +++ b/actionmailer/lib/action_mailer/message_delivery.rb @@ -53,6 +53,12 @@ module ActionMailer # Notifier.welcome(User.first).deliver_later!(wait: 1.hour) # Notifier.welcome(User.first).deliver_later!(wait_until: 10.hours.from_now) # + # Options: + # + # * :wait - Enqueue the email to be delivered with a delay + # * :wait_until - Enqueue the email to be delivered at (after) a specific date / time + # * :queue - Enqueue the email on the specified queue + # # By default, the email will be enqueued using ActionMailer::DeliveryJob. Each # ActionMailer::Base class can specify the job to use by setting the class variable # +delivery_job+. @@ -60,12 +66,6 @@ module ActionMailer # class AccountRegistrationMailer < ApplicationMailer # self.delivery_job = RegistrationDeliveryJob # end - # - # Options: - # - # * :wait - Enqueue the email to be delivered with a delay - # * :wait_until - Enqueue the email to be delivered at (after) a specific date / time - # * :queue - Enqueue the email on the specified queue def deliver_later!(options = {}) enqueue_delivery :deliver_now!, options end @@ -77,6 +77,12 @@ module ActionMailer # Notifier.welcome(User.first).deliver_later(wait: 1.hour) # Notifier.welcome(User.first).deliver_later(wait_until: 10.hours.from_now) # + # Options: + # + # * :wait - Enqueue the email to be delivered with a delay. + # * :wait_until - Enqueue the email to be delivered at (after) a specific date / time. + # * :queue - Enqueue the email on the specified queue. + # # By default, the email will be enqueued using ActionMailer::DeliveryJob. Each # ActionMailer::Base class can specify the job to use by setting the class variable # +delivery_job+. @@ -84,12 +90,6 @@ module ActionMailer # class AccountRegistrationMailer < ApplicationMailer # self.delivery_job = RegistrationDeliveryJob # end - # - # Options: - # - # * :wait - Enqueue the email to be delivered with a delay. - # * :wait_until - Enqueue the email to be delivered at (after) a specific date / time. - # * :queue - Enqueue the email on the specified queue. def deliver_later(options = {}) enqueue_delivery :deliver_now, options end