ActionMailer Preview. Is it posible to use multiple paths?

18 views
Skip to first unread message

Илья Николаевич

unread,
Mar 25, 2017, 3:44:02 AM3/25/17
to Ruby on Rails: Talk
Hi there!

In my project I have a few engines. Each engine has its own set of Mailers and templates.

I want to have Previews for each specific engine, and keep them in engines.

I've found that ActionMailer Preview provides a way to change a path to preview classes, but looks like it's impossible to use an array of paths, or use something like `prepand_view_path / append_view_path ` like we can do in controllers.

https://github.com/rails/rails/blob/3faf7485623da55215d6d7f3dcb2eed92c59c699/actionmailer/lib/action_mailer/preview.rb#L92

Is there any way to have multiple paths for ActionMailer Preview?

Is it possible to create some kind of monkey patch to implement it?

Thanks!

Jeremy Wilmot

unread,
Mar 31, 2017, 4:59:59 PM3/31/17
to Ruby on Rails: Talk
I've run into this same issue myself. It looks like work started on this feature but bogged down. See https://github.com/rails/rails/pull/16836

Would be great to get that pull request fixed up and merged in!
Reply all
Reply to author
Forward
0 new messages