Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configuration for a subject prefix for email #66

Merged
merged 9 commits into from
Oct 23, 2024

Conversation

francescob
Copy link
Contributor

Added an option to add a subject prefix to the emails sent by solid_errors. Useful when you have multiple apps/environments using solid errors and what to easily filter the email received

Copy link
Owner

@fractaledmind fractaledmind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea, just one small change needed

app/mailers/solid_errors/error_mailer.rb Outdated Show resolved Hide resolved
@francescob
Copy link
Contributor Author

Ok, now the empty prefix is handled.
i also have another idea that fits in the way we use solid_errors:
Make subject_prefix enabled by default, with a value of
[#{Rails.application.name.upcase][#Rails.application.env.upcase].
Disable it with config.solid_errors.subject_prefix = "" or override it with your own custom string
What do you think about that?

Copy link
Owner

@fractaledmind fractaledmind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fractaledmind
Copy link
Owner

Ok, now the empty prefix is handled. i also have another idea that fits in the way we use solid_errors: Make subject_prefix enabled by default, with a value of [#{Rails.application.name.upcase][#Rails.application.env.upcase]. Disable it with config.solid_errors.subject_prefix = "" or override it with your own custom string What do you think about that?

Making this the default would be a breaking change. I would rather introduce such a change slowly. So, let's start by providing that as the example in the README for this feature.

@francescob
Copy link
Contributor Author

Ok i've renamed the option for conformity with other email settings and updated the README

Copy link
Owner

@fractaledmind fractaledmind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few changes, then should be ready to go

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
app/mailers/solid_errors/error_mailer.rb Outdated Show resolved Hide resolved
francescob and others added 4 commits October 23, 2024 16:09
Co-authored-by: Stephen Margheim <stephen.margheim@gmail.com>
Co-authored-by: Stephen Margheim <stephen.margheim@gmail.com>
Co-authored-by: Stephen Margheim <stephen.margheim@gmail.com>
Copy link
Owner

@fractaledmind fractaledmind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely! Thank you for this

@fractaledmind fractaledmind merged commit 4b32982 into fractaledmind:main Oct 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants