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, locale: I18nStore::DEFAULT_LOCALE) ⇒ Object

Parameters:

  • locale (String) (defaults to: I18nStore::DEFAULT_LOCALE)

    resolved at enqueue time, never read from Current — a mailer renders outside the request that set it.



7
8
9
10
11
12
13
14
15
16
# File 'app/mailers/rails_error_dashboard/error_notification_mailer.rb', line 7

def error_alert(error_log, recipients, locale: I18nStore::DEFAULT_LOCALE)
  @error_log = error_log
  @dashboard_url = dashboard_url(error_log)
  @red_locale = locale

  mail(
    to: recipients,
    subject: subject_for(error_log, locale)
  )
end