Last active
October 15, 2016 04:25
-
-
Save cwsaylor/3bd3dae41b083d4e6aaa255ffde006bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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