fractaledmind / solid_errors

database-backed, app-internal exception tracker for Rails applications
MIT License
332 stars 17 forks source link

fix SolidErrors.send_emails? that always returns true #46

Closed defkode closed 6 months ago

defkode commented 7 months ago

Currently SolidErrors.send_emails? always returns true, even when disabled in configuration 👇🏻

config.solid_errors.send_emails = false

I think following condition has wrong default:

def send_emails?
  @send_emails ||= ENV["SOLIDERRORS_SEND_EMAILS"] || @@send_emails || true
end`

Excerpt from README:

If you have not set `send_emails` to `true` or have not set an `email_to` address, Solid Errors will not send any email notifications.

This PR fixes this.

fractaledmind commented 5 months ago

Released version 0.4.3 now with this improvement