Sha256: 3e3720eca3d2dc25dd6f573766ab7baf4f5b94cc651bfe959559efead83747f1

Contents?: true

Size: 843 Bytes

Versions: 1

Compression:

Stored size: 843 Bytes

Contents

class Tartarus::Notifiers::Mail < ActionMailer::Base
  
  def notification(address, exception)
    subject = "Exception raised at #{exception.controller_path}##{exception.action_name} (#{exception.exception_class}) #{exception.message}" 
    mail(:to => address, :from => Tartarus.configuration['sender'], :subject => subject) do |format|
      format.text do 
        render :text => %{
          A new exception was raised (#{exception.created_at.strftime("%m/%d/%Y %I:%M%p")}):

          Class    : #{exception.exception_class}
          Location : #{exception.controller_path}##{exception.action_name} 
          Message  : #{exception.message}
          Count    : #{exception.group_count}

          Backtrace: 
          #{exception.backtrace}

          Request: 
          #{exception.request}
        }
      end
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tartarus-2.0.0 lib/tartarus/notifiers/mail.rb