Skip to content

Instantly share code, notes, and snippets.

@cwsaylor
Last active October 15, 2016 04:25
Show Gist options
  • Save cwsaylor/3bd3dae41b083d4e6aaa255ffde006bb to your computer and use it in GitHub Desktop.
Save cwsaylor/3bd3dae41b083d4e6aaa255ffde006bb to your computer and use it in GitHub Desktop.
ActiveAdmin.register_page "Mailers" do
sidebar :mailers do
ul do
li do
link_to "Password Reset", "/rails/mailers/devise_mailer/reset_password_instructions", target: "preview"
end
li do
link_to "Confirmation", "/rails/mailers/devise_mailer/confirmation_instructions", target: "preview"
end
li do
link_to "Unlock", "/rails/mailers/devise_mailer/unlock_instructions", target: "preview"
end
end
end
content do
content_tag :iframe, nil, name: "preview", width: "75%", height: "550", seamless: "seamless"
end
end
# Preview all emails at http://localhost:3000/rails/mailers
class DeviseMailerPreview < ActionMailer::Preview
def confirmation_instructions
Devise::Mailer.confirmation_instructions(user, "12345678")
end
def reset_password_instructions
Devise::Mailer.reset_password_instructions(user, "12345678")
end
def unlock_instructions
Devise::Mailer.unlock_instructions(user, "12345678")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment