Sha256: 7b8f3d8ef724346ebe9bfbdd332a57a81c92db4b7f2a0c0a3f3ca2ae9c2cf839
Contents?: true
Size: 915 Bytes
Versions: 40
Compression:
Stored size: 915 Bytes
Contents
# frozen_string_literal: true module ActionMailer module Callbacks extend ActiveSupport::Concern included do include ActiveSupport::Callbacks define_callbacks :deliver, skip_after_callbacks_if_terminated: true end module ClassMethods # Defines a callback that will get called right before the # message is sent to the delivery method. def before_deliver(*filters, &blk) set_callback(:deliver, :before, *filters, &blk) end # Defines a callback that will get called right after the # message's delivery method is finished. def after_deliver(*filters, &blk) set_callback(:deliver, :after, *filters, &blk) end # Defines a callback that will get called around the message's deliver method. def around_deliver(*filters, &blk) set_callback(:deliver, :around, *filters, &blk) end end end end
Version data entries
40 entries across 40 versions & 5 rubygems