From ec3429a3d6da2250f360d629fa6300e46f3d53fb Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Fri, 7 Dec 2012 14:43:49 +0100 Subject: The return value from mailer methods is not relevant. --- actionmailer/lib/action_mailer/base.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionmailer/lib') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index c9f10b359b..e4da975834 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -501,6 +501,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 @@ -508,7 +509,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: @@ -668,6 +670,7 @@ 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 -- cgit v1.2.3