Skip to content

Commit

Permalink
Merge pull request #46 from defkode/fix_configuration_send_emails
Browse files Browse the repository at this point in the history
fix SolidErrors.send_emails? that always returns true
  • Loading branch information
fractaledmind committed May 11, 2024
2 parents 68f487f + cfeb80d commit 786e3c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

Solid Errors is a DB-based, app-internal exception tracker for Rails applications, designed with simplicity and performance in mind. It uses the new [Rails error reporting API](https://guides.rubyonrails.org/error_reporting.html) to store uncaught exceptions in the database, and provides a simple UI for viewing and managing exceptions.

> [!WARNING]
> [!WARNING]
> The current point release of Rails (7.1.3.2) has a bug which severely limits the utility of Solid Errors. Exceptions raised during a web request *are not* reported to Rails' error reporter. There is a fix in the `main` branch, but it has not been released in a new point release. As such, Solid Errors is **not** production-ready unless you are running Rails from the `main` branch or until a new point version is released and you upgrade.
> The original bug report can be found [here](https://github.com/rails/rails/issues/51002) and the pull request making the fix is [here](https://github.com/rails/rails/pull/51050). I will try to backport the fix into the gem directly, but I haven't quite figured it out yet.
Expand Down Expand Up @@ -132,7 +132,7 @@ Solid Errors _can_ send email notifications whenever an error occurs, if your ap
There are two ways to configure email notifications. First, you can use environment variables:

```ruby
ENV["SOLIDERRORS_SEND_EMAILS"] = true # defaults to true
ENV["SOLIDERRORS_SEND_EMAILS"] = true # defaults to false
ENV["SOLIDERRORS_EMAIL_FROM"] = "[email protected]" # defaults to "[email protected]"
ENV["SOLIDERRORS_EMAIL_TO"] = "[email protected]" # no default, must be set
```
Expand Down
2 changes: 1 addition & 1 deletion lib/solid_errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def password
end

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

def email_from
Expand Down

0 comments on commit 786e3c1

Please sign in to comment.