Sha256: c03b18aa17e60f892d9e3dee1897a2dcb5fae1be063e14cf9156f7f7ee1e9826
Contents?: true
Size: 425 Bytes
Versions: 24
Compression:
Stored size: 425 Bytes
Contents
require 'mail' module Delayed class PerformableMailer < PerformableMethod def perform object.send(method_name, *args).deliver end end module DelayMail def delay(options = {}) DelayProxy.new(PerformableMailer, self, options) end end end Mail::Message.class_eval do def delay(*args) raise RuntimeError, "Use MyMailer.delay.mailer_action(args) to delay sending of emails." end end
Version data entries
24 entries across 24 versions & 4 rubygems