Sha256: bbd7b27eab210c2ef64d2be3418d94a730e0f85d81b6f5c68b6b38954b3ffa0f

Contents?: true

Size: 461 Bytes

Versions: 3

Compression:

Stored size: 461 Bytes

Contents

module SolidErrors
  # adapted from: https://github.com/codergeek121/email_error_reporter/blob/main/lib/email_error_reporter/error_mailer.rb
  class ErrorMailer < ActionMailer::Base
    def error_occurred(occurrence)
      @occurrence = occurrence
      @error = occurrence.error

      mail(
        subject: "#{@error.severity_emoji} #{@error.exception_class}",
        from: SolidErrors.email_from,
        to: SolidErrors.email_to
      )
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
solid_errors-0.6.1 app/mailers/solid_errors/error_mailer.rb
solid_errors-0.6.0 app/mailers/solid_errors/error_mailer.rb
solid_errors-0.5.0 app/mailers/solid_errors/error_mailer.rb