From baaf3769ff179248353ced0c60495c349a912fe1 Mon Sep 17 00:00:00 2001 From: hnatt Date: Fri, 30 Oct 2015 10:41:58 +0200 Subject: Don't mutate headers in ActionMailer::Base#collect_responses_from_templates --- actionmailer/lib/action_mailer/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 0f7f271354..c350cd5bcc 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -902,8 +902,8 @@ module ActionMailer end def collect_responses_from_templates(headers) - templates_path = headers.delete(:template_path) || self.class.mailer_name - templates_name = headers.delete(:template_name) || action_name + templates_path = headers[:template_path] || self.class.mailer_name + templates_name = headers[:template_name] || action_name each_template(Array(templates_path), templates_name).map do |template| self.formats = template.formats -- cgit v1.2.3