Sha256: b0df0471fa543e0b0a910e1eb284aaa250970d4a8f864cffa723cbbb8450e15c

Contents?: true

Size: 904 Bytes

Versions: 5

Compression:

Stored size: 904 Bytes

Contents

class Tartarus::Notifiers::Mail < ActionMailer::Base
  
  def notification(address, exception)
    subject = "#{Tartarus.configuration['notification_prefix']}Exception raised at #{exception.controller_path}##{exception.action_name} (#{exception.exception_class}) #{exception.message}" 
    mail(:to => address, :from => Tartarus.configuration['notification_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

5 entries across 5 versions & 1 rubygems

Version Path
tartarus-2.3 lib/tartarus/notifiers/mail.rb
tartarus-2.2 lib/tartarus/notifiers/mail.rb
tartarus-2.0.4 lib/tartarus/notifiers/mail.rb
tartarus-2.0.3 lib/tartarus/notifiers/mail.rb
tartarus-2.0.1 lib/tartarus/notifiers/mail.rb