aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/lib/action_mailer/base.rb')
-rw-r--r--actionmailer/lib/action_mailer/base.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 2a11cb6ca7..a9fb49a303 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -454,7 +454,19 @@ module ActionMailer #:nodoc:
def process(*args) #:nodoc:
lookup_context.skip_default_locale!
- super
+
+ generated_mail = super
+ unless generated_mail
+ @_message = NullMail.new
+ end
+ end
+
+ class NullMail #:nodoc:
+ def body; '' end
+
+ def method_missing(*args)
+ nil
+ end
end
def mailer_name