Last active
March 7, 2019 14:13
-
-
Save pcasaretto/1b2c5e051db129606e8ee7b088ce7ec7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LoggingTransactionalMailer < TransactionalMailer | |
def send_mail(user, mail) | |
p "sending email to user #{user.id}" | |
super(user.email, mail.body) | |
end | |
end | |
class BlockingLoggingTransactionalMailer < LoggingTransactionalMailer | |
def send_mail(user, mail) | |
return unless @user.has_active_subscription? | |
super(user.email, mail.body) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment