After updating my project to Rails 6.1 I get this error:
NoMethodError:
undefined method `add_template_helper' for ApplicationMailer:Class
In the documentation does not seem to be deprecated.
So, apparently, this method was deleted without deprecation warning in this commit:
https://github.com/rails/rails/commit/cb3b37b37975ceb1d38bec9f02305ff5c14ba8e9
So, the fix for this issue is to replace:
class MyMailer < ApplicationMailer
add_template_helper MyHelper
With:
class MyMailer < ApplicationMailer
helper MyHelper
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With