Class: ActionMailer::Base

Inherits:
Object
  • Object
show all
Defined in:
app/mailers/confirmation_mailer.rb

Direct Known Subclasses

ConfirmationMailer

Instance Method Summary collapse

Instance Method Details

#do_not_deliver!Object

A simple way to short circuit the delivery of an email from within deliver_* methods defined in ActionMailer::Base subclases.

Raises:



21
22
23
# File 'app/mailers/confirmation_mailer.rb', line 21

def do_not_deliver!
  raise AbortDeliveryError
end

#process(*args) ⇒ Object



25
26
27
28
29
30
31
# File 'app/mailers/confirmation_mailer.rb', line 25

def process(*args)
  begin
    super *args
  rescue AbortDeliveryError
    self.message = BlackholeMailMessage
  end
end