user_mailer_preview.rb 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. end