logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

notification_mailer_preview.rb (1437B)


  1. # Preview all emails at http://localhost:3000/rails/mailers/notification_mailer
  2. class NotificationMailerPreview < ActionMailer::Preview
  3. # Preview this email at http://localhost:3000/rails/mailers/notification_mailer/mention
  4. def mention
  5. m = Mention.last
  6. NotificationMailer.mention(m.account, Notification.find_by(activity: m))
  7. end
  8. # Preview this email at http://localhost:3000/rails/mailers/notification_mailer/follow
  9. def follow
  10. f = Follow.last
  11. NotificationMailer.follow(f.target_account, Notification.find_by(activity: f))
  12. end
  13. # Preview this email at http://localhost:3000/rails/mailers/notification_mailer/follow_request
  14. def follow_request
  15. f = Follow.last
  16. NotificationMailer.follow_request(f.target_account, Notification.find_by(activity: f))
  17. end
  18. # Preview this email at http://localhost:3000/rails/mailers/notification_mailer/favourite
  19. def favourite
  20. f = Favourite.last
  21. NotificationMailer.favourite(f.status.account, Notification.find_by(activity: f))
  22. end
  23. # Preview this email at http://localhost:3000/rails/mailers/notification_mailer/reblog
  24. def reblog
  25. r = Status.where.not(reblog_of_id: nil).first
  26. NotificationMailer.reblog(r.reblog.account, Notification.find_by(activity: r))
  27. end
  28. # Preview this email at http://localhost:3000/rails/mailers/notification_mailer/digest
  29. def digest
  30. NotificationMailer.digest(Account.first, since: 90.days.ago)
  31. end
  32. end