The method `add_template_helper` does not seem to work in Rails 6.1

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

Leave a Comment