Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Davila <rdavila84@gmail.com>2017-01-09 21:01:07 +0300
committerRuben Davila <rdavila84@gmail.com>2017-01-09 21:01:07 +0300
commitc6ebe440dad6932f65254f058a5a291973526f99 (patch)
tree45a9329047f46f4fa333857c1f5c6ae648e27cef /lib/email_template_interceptor.rb
parent6c62482144e786f83ed62298e06604e46e93107e (diff)
Use #parts instead of #part to read all the parts of the Message.
Looks like I was accidentally using #part which was adding an extra empty Mime section
Diffstat (limited to 'lib/email_template_interceptor.rb')
-rw-r--r--lib/email_template_interceptor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/email_template_interceptor.rb b/lib/email_template_interceptor.rb
index fb04a7824b8..63f9f8d7a5a 100644
--- a/lib/email_template_interceptor.rb
+++ b/lib/email_template_interceptor.rb
@@ -5,8 +5,8 @@ class EmailTemplateInterceptor
def self.delivering_email(message)
# Remove HTML part if HTML emails are disabled.
unless current_application_settings.html_emails_enabled
- message.part.delete_if do |part|
- part.content_type.try(:start_with?, 'text/html')
+ message.parts.delete_if do |part|
+ part.content_type.start_with?('text/html')
end
end
end