Groups
Sign in
Groups
Ruby on Rails: Talk
Conversations
About
Send feedback
Help
Changing the ActionMailer Preview header to include more metadata
62 views
Skip to first unread message
David Svensson
unread,
Dec 30, 2016, 2:55:42 AM
12/30/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
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
Auto Generated Inline Image 1
Reply all
Reply to author
Forward
0 new messages