闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.6 KiB

  1. # Preview all emails at http://localhost:3000/rails/mailers/user_mailer
  2. class UserMailerPreview < ActionMailer::Preview
  3. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/confirmation_instructions
  4. def confirmation_instructions
  5. UserMailer.confirmation_instructions(User.first, 'spec')
  6. end
  7. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/email_changed
  8. def email_changed
  9. user = User.first
  10. user.unconfirmed_email = 'foo@bar.com'
  11. UserMailer.email_changed(user)
  12. end
  13. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/password_change
  14. def password_change
  15. UserMailer.password_change(User.first)
  16. end
  17. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/reconfirmation_instructions
  18. def reconfirmation_instructions
  19. user = User.first
  20. user.unconfirmed_email = 'foo@bar.com'
  21. UserMailer.confirmation_instructions(user, 'spec')
  22. end
  23. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/reset_password_instructions
  24. def reset_password_instructions
  25. UserMailer.reset_password_instructions(User.first, 'spec')
  26. end
  27. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/welcome
  28. def welcome
  29. UserMailer.welcome(User.first)
  30. end
  31. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/backup_ready
  32. def backup_ready
  33. UserMailer.backup_ready(User.first, Backup.first)
  34. end
  35. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/warning
  36. def warning
  37. UserMailer.warning(User.first, AccountWarning.new(text: '', action: :silence))
  38. end
  39. end