instance method enqueue_delivery

Ruby on Rails 8.1.2

Since v4.2.9 Private

Available in: v4.2.9 v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

enqueue_delivery(delivery_method, options = {})

No documentation comment.

Parameters

delivery_method req
options opt = {}
Source
# File actionmailer/lib/action_mailer/message_delivery.rb, line 174
      def enqueue_delivery(delivery_method, options = {})
        if processed?
          ::Kernel.raise "You've accessed the message before asking to " \
            "deliver it later, so you may have made local changes that would " \
            "be silently lost if we enqueued a job to deliver it. Why? Only " \
            "the mailer method *arguments* are passed with the delivery job! " \
            "Do not access the message in any way if you mean to deliver it " \
            "later. Workarounds: 1. don't touch the message before calling " \
            "#deliver_later, 2. only touch the message *within your mailer " \
            "method*, or 3. use a custom Active Job instead of #deliver_later."
        else
          @mailer_class.delivery_job.set(options).perform_later(
            @mailer_class.name, @action.to_s, delivery_method.to_s, args: @args)
        end
      end

Defined in actionmailer/lib/action_mailer/message_delivery.rb line 174 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionMailer::MessageDelivery

Type at least 2 characters to search.

↑↓ navigate · open · esc close