Guest User

Untitled

a guest
Feb 17th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. class LoggingTransactionalMailer < TransactionalMailer
  2. def send_mail(user,mail)
  3. p "sending email to user #{user.id}"
  4. super(user.email, mail.body)
  5. end
  6. end
  7.  
  8. class BlockingLoggingTransactionalMailer < LoggingTransactionalMailer
  9. def send_mail(user,mail)
  10. return uless @user.has_active_subscription?
  11. super(user.email, mail.body)
  12. end
  13. end
Add Comment
Please, Sign In to add comment