aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/base.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 04274065dc..4a61bac0a5 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -499,6 +499,7 @@ module ActionMailer
# method, for instance).
def initialize(method_name=nil, *args)
super()
+ @_mail_was_called = false
@_message = Mail.new
process(method_name, *args) if method_name
end
@@ -506,7 +507,8 @@ module ActionMailer
def process(*args) #:nodoc:
lookup_context.skip_default_locale!
- @_message = NullMail.new unless super
+ super
+ @_message = NullMail.new unless @_mail_was_called
end
class NullMail #:nodoc:
@@ -666,11 +668,11 @@ module ActionMailer
# end
#
def mail(headers={}, &block)
+ @_mail_was_called = true
m = @_message
- # At the beginning, do not consider class default for parts order neither content_type
+ # At the beginning, do not consider class default for content_type
content_type = headers[:content_type]
- parts_order = headers[:parts_order]
# Call all the procs (if any)
class_default = self.class.default