Class: ResqueFailedJobMailer::Mailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
lib/resque_failed_job_mailer/mailer.rb

Instance Method Summary collapse

Instance Method Details

#alert(notifier) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/resque_failed_job_mailer/mailer.rb', line 3

def alert notifier
  @notifier = notifier
  text = ERB.new(File.read(File.dirname(__FILE__) + "/alert.html.erb")).result(binding)
  mail :from => Resque::Failure::Notifier.from, :to => Resque::Failure::Notifier.to, :subject => "[Resque] #{@notifier.exception}" do |format|
    format.html { render :text => text }
  end
end