Ruby on Rails Thursday, December 29, 2016

Hi!
I've been struggling with adding metadata to the ActionMailer Preview-header for a while.
What I would ideally like to do is to override the following file somewhere, adding some custom metadata to the header like in the picture attached below:
https://github.com/rails/rails/blob/4-2-stable/railties/lib/rails/templates/rails/mailers/email.html.erb
Alternatively override the mailers controller to render a different template on preview:
https://github.com/rails/rails/blob/4-2-stable/railties/lib/rails/mailers_controller.rb

Is it possible to easily override either of those files without having to change the base gems or similar? Would an extra initializer be needed and if so what should be included?

Hope someone here has some insights!
Best,
David


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e381969a-b7a5-4539-a98e-5bced1edd771%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment