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.

67 lines
2.5 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/two_factor_disabled
  18. def two_factor_disabled
  19. UserMailer.two_factor_disabled(User.first)
  20. end
  21. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/two_factor_enabled
  22. def two_factor_enabled
  23. UserMailer.two_factor_enabled(User.first)
  24. end
  25. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/two_factor_recovery_codes_changed
  26. def two_factor_recovery_codes_changed
  27. UserMailer.two_factor_recovery_codes_changed(User.first)
  28. end
  29. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/reconfirmation_instructions
  30. def reconfirmation_instructions
  31. user = User.first
  32. user.unconfirmed_email = 'foo@bar.com'
  33. UserMailer.confirmation_instructions(user, 'spec')
  34. end
  35. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/reset_password_instructions
  36. def reset_password_instructions
  37. UserMailer.reset_password_instructions(User.first, 'spec')
  38. end
  39. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/welcome
  40. def welcome
  41. UserMailer.welcome(User.first)
  42. end
  43. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/backup_ready
  44. def backup_ready
  45. UserMailer.backup_ready(User.first, Backup.first)
  46. end
  47. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/warning
  48. def warning
  49. UserMailer.warning(User.first, AccountWarning.new(text: '', action: :silence), [Status.first.id])
  50. end
  51. # Preview this email at http://localhost:3000/rails/mailers/user_mailer/sign_in_token
  52. def sign_in_token
  53. UserMailer.sign_in_token(User.first.tap { |user| user.generate_sign_in_token }, '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0', Time.now.utc)
  54. end
  55. end