aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorYves Senn <yves.senn@garaio.com>2012-12-10 17:00:41 +0100
committerYves Senn <yves.senn@garaio.com>2012-12-10 17:00:41 +0100
commit9b72c36783516f5ef8f2fac5f6f342a6a48d8d78 (patch)
tree20730cde9066e43d10f48a51fd37cf58db9eca30 /actionmailer/lib
parentd1b9c5fd119a6098a51eb2c2f7b2f52e53b8c240 (diff)
downloadrails-9b72c36783516f5ef8f2fac5f6f342a6a48d8d78.tar.gz
rails-9b72c36783516f5ef8f2fac5f6f342a6a48d8d78.tar.bz2
rails-9b72c36783516f5ef8f2fac5f6f342a6a48d8d78.zip
Backport #8450, the return value from mailer methods is not relevant.
Conflicts: actionmailer/CHANGELOG.md actionmailer/lib/action_mailer/base.rb
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/base.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 1aeeadcacc..9e2f640915 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -448,6 +448,7 @@ module ActionMailer #:nodoc:
# 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
@@ -455,10 +456,8 @@ module ActionMailer #:nodoc:
def process(*args) #:nodoc:
lookup_context.skip_default_locale!
- generated_mail = super
- unless generated_mail
- @_message = NullMail.new
- end
+ super
+ @_message = NullMail.new unless @mail_was_called
end
class NullMail #:nodoc: