Remove ActionMailer as a dependency#77
Conversation
There was a problem hiding this comment.
I added it as a development dependency anyway
There was a problem hiding this comment.
Zeitwerk of course complains if the class is not defined. I looked if I could exclude only this class from eager_loading and requiring it manually only if ActionMailer::Base is defined, but I did not figure out how.
This is the approach I figured: I always define it, and raise if ActionMailer is actually not there. I don't really have performance consent, and we should never reach this point anyway (see below).
Yes, it smells a bit to be honest, so I could investigate more if you think I should.
There was a problem hiding this comment.
This is what I'd do: immediatly check if we want to send emails but ActionMailer is not there: show a nice error message and explain how it can be fixed.
|
Live in v0.7.0 now. Thanks |
Closes #76
This PR aims to remove ActionMailer as a dependency so solid_errors can be used also in Rails Apps that don't have it as a dependency. I find
solid_errorsa perfect solution for my smaller projects, and many of them don't actually send emails sorequire "action_mailer/railtie"is commented out inapplication.rb