aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-12-10 06:40:33 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-12-10 06:40:33 -0800
commit287a8d878ce18da401cbcc57c718a43c16e1494e (patch)
tree310308b01cceda3903fde4d9c59112f6540140f0 /actionmailer/lib/action_mailer
parentf2d1e279afea3f53277b3ce6edf398f501708c0b (diff)
parentec3429a3d6da2250f360d629fa6300e46f3d53fb (diff)
downloadrails-287a8d878ce18da401cbcc57c718a43c16e1494e.tar.gz
rails-287a8d878ce18da401cbcc57c718a43c16e1494e.tar.bz2
rails-287a8d878ce18da401cbcc57c718a43c16e1494e.zip
Merge pull request #8450 from senny/8448_mailer_return_values
the return value of mailer methods should not be relevant
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r--actionmailer/lib/action_mailer/base.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index dcf13e927c..95a680ac23 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,6 +668,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