diff options
author | Aaron Patterson <tenderlove@github.com> | 2019-02-25 14:04:10 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-25 14:04:10 -0800 |
commit | 56b030605b4d968077a4ddb96b4ab619e75fb999 (patch) | |
tree | 7658993bdbb1a78094d2cbe3d88691983aa88277 /actionmailer | |
parent | 790a3e69acb2fa172c6bce45e040e9f15d9bef3d (diff) | |
parent | ca5e23ed4d8818d81314953aadd422b2cbde63b0 (diff) | |
download | rails-56b030605b4d968077a4ddb96b4ab619e75fb999.tar.gz rails-56b030605b4d968077a4ddb96b4ab619e75fb999.tar.bz2 rails-56b030605b4d968077a4ddb96b4ab619e75fb999.zip |
Merge pull request #35406 from rails/template-has-one-format
Templates have one format
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 033a7f5b9e..52360d40fe 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -973,7 +973,7 @@ module ActionMailer templates_name = headers[:template_name] || action_name each_template(Array(templates_path), templates_name).map do |template| - self.formats = template.formats + self.formats = [template.format] { body: render(template: template), content_type: template.type.to_s @@ -986,7 +986,7 @@ module ActionMailer if templates.empty? raise ActionView::MissingTemplate.new(paths, name, paths, false, "mailer") else - templates.uniq(&:formats).each(&block) + templates.uniq(&:format).each(&block) end end |