diff options
author | Yves Senn <yves.senn@garaio.com> | 2012-12-07 14:43:49 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@garaio.com> | 2012-12-10 09:10:47 +0100 |
commit | ec3429a3d6da2250f360d629fa6300e46f3d53fb (patch) | |
tree | acda7dd44e33baf1d1043609f4773b1cb78b8e23 /actionmailer/lib | |
parent | a9dc44677ca0caa3660a54b191dca5229dc25f4f (diff) | |
download | rails-ec3429a3d6da2250f360d629fa6300e46f3d53fb.tar.gz rails-ec3429a3d6da2250f360d629fa6300e46f3d53fb.tar.bz2 rails-ec3429a3d6da2250f360d629fa6300e46f3d53fb.zip |
The return value from mailer methods is not relevant.
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 5 |
1 files changed, 4 insertions, 1 deletions
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 |