diff options
author | Jaap van der Plas <jvdplas@gmail.com> | 2019-02-13 15:55:38 +0100 |
---|---|---|
committer | George Claghorn <george.claghorn@gmail.com> | 2019-02-13 09:55:38 -0500 |
commit | 2488901da8a4d896003254869a378f0c1b4ed3f2 (patch) | |
tree | 6911e103fef3a6e87f9274b3f8bde75417c232a6 /actionmailer/test/mailers | |
parent | 47e3bbeb9057b37c244330cc4e745c8a8090e8c5 (diff) | |
download | rails-2488901da8a4d896003254869a378f0c1b4ed3f2.tar.gz rails-2488901da8a4d896003254869a378f0c1b4ed3f2.tar.bz2 rails-2488901da8a4d896003254869a378f0c1b4ed3f2.zip |
Don’t log recipients when sending mail
Since production applications typically run with log level info and
email adresses should be considered as sensitive data we want to prevent
them from ending up in the logs. In development mode (with log level
debug) they are still logged as part of the Mail::Message object.
Diffstat (limited to 'actionmailer/test/mailers')
-rw-r--r-- | actionmailer/test/mailers/base_mailer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionmailer/test/mailers/base_mailer.rb b/actionmailer/test/mailers/base_mailer.rb index c1bb48cc96..dbe1c4f0e6 100644 --- a/actionmailer/test/mailers/base_mailer.rb +++ b/actionmailer/test/mailers/base_mailer.rb @@ -21,8 +21,8 @@ class BaseMailer < ActionMailer::Base mail(template_name: "welcome", template_path: path) end - def welcome_without_deliveries - mail(template_name: "welcome") + def welcome_without_deliveries(hash = {}) + mail({ template_name: "welcome" }.merge!(hash)) mail.perform_deliveries = false end |