Slide 46
Slide 46 text
def deliver_acidic(options = {})
job = delivery_job_class
attributes = { adapter: "activejob", job_name: job.name }
job_args = if job <= ActionMailer::Parameterized::MailDeliveryJob
[@mailer_class.name, @action, "deliver_now", {params: @params, args:
@args}]
else
[@mailer_class.name, @action, "deliver_now", @params, *@args]
end
attributes[:job_args] = job.new(job_args).serialize
StagedJob.create!(attributes)
end