I want to use the methods I defined in app/helpers/annotations_helper.rb
in my ReportMailer views (app/views/report_mailer/usage_report.text.html.erb
). How do I do this?
Based on this guide it seems like the add_template_helper(helper_module)
method might do what I want, but I can't figure out how to use it.
(BTW, is there a reason you get access to a different set of helpers in mailer views? This is pretty annoying.)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…