Using Helpers in ActionMailer

How do I access the helpers in ActionMailer that I created?

I tried: How to use my helpers in an ActionMailer view? for my own created assistant, but didn't work. Any tips?

+6
source share
1 answer

This worked for me in the past in Rails 3:

class OrderMailer < ActionMailer::Base helper :application, :orders, :products ... end 

My user assistants are obviously orders and products.

+8
source

Source: https://habr.com/ru/post/887774/


All Articles