Skip to content

Instantly share code, notes, and snippets.

@joshmcarthur
Last active June 2, 2022 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshmcarthur/7fa1501eda3f454f4c095ea35506fc69 to your computer and use it in GitHub Desktop.
Save joshmcarthur/7fa1501eda3f454f4c095ea35506fc69 to your computer and use it in GitHub Desktop.
Devise ActionMailer::Preview
# spec/mailers/previews/devise_mailer_preview.rb
class DeviseMailerPreview < ActionMailer::Preview
# We do not have confirmable enabled, but if we did, this is
# how we could generate a preview:
# def confirmation_instructions
# Devise::Mailer.confirmation_instructions(User.first, "faketoken")
# end
def reset_password_instructions
Devise::Mailer.reset_password_instructions(User.first, "faketoken")
end
def unlock_instructions
Devise::Mailer.unlock_instructions(User.first, "faketoken")
end
def email_changed
Devise::Mailer.email_changed(User.first)
end
def password_changed
Devise::Mailer.password_change(User.first)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment