Last time we added custom editable mail templates to our mailers and made them Markdown format [read first]. Awesome. Let’s add a preview to the templates with 37-signals mail_view. I don’t know how we lived without this before!
Remember how we pre-declared our mailers in a hash. This is going to come in handy for config/routes.rb.
Now we have a mail_templates/devise/mailer/preview/reset_password_instructions path for a Devise::Mailer mailer!
This needs to route somewhere. Let’s add a preview into our overridden DeviseMailer.