Class: RailsErrorDashboard::ErrorNotificationMailer

Inherits:
ApplicationMailer
  • Object
show all
Defined in:
app/mailers/rails_error_dashboard/error_notification_mailer.rb

Instance Method Summary collapse

Instance Method Details

#error_alert(error_log, recipients) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'app/mailers/rails_error_dashboard/error_notification_mailer.rb', line 5

def error_alert(error_log, recipients)
  @error_log = error_log
  @dashboard_url = dashboard_url(error_log)

  mail(
    to: recipients,
    subject: "🚨 #{error_log.error_type}: #{truncate_subject(error_log.message)}"
  )
end