aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer/delivery_methods.rb
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2010-01-27 00:21:22 +1100
committerMikel Lindsaar <raasdnil@gmail.com>2010-01-27 00:21:22 +1100
commit1133757a95f5cee0044cca6f360f5d63df3bb583 (patch)
tree814e4cc19c9b5625f1cc2c19d1fd615453e8b87c /actionmailer/lib/action_mailer/delivery_methods.rb
parent21dcc20ed29053c8ffd4d3a5a68a40f6e225512b (diff)
parent8fabcb2eca03150b1c0c3dbc88dd13123f76894f (diff)
downloadrails-1133757a95f5cee0044cca6f360f5d63df3bb583.tar.gz
rails-1133757a95f5cee0044cca6f360f5d63df3bb583.tar.bz2
rails-1133757a95f5cee0044cca6f360f5d63df3bb583.zip
Merge branch 'master' of github.com:mikel/rails
Conflicts: actionmailer/lib/action_mailer/base.rb
Diffstat (limited to 'actionmailer/lib/action_mailer/delivery_methods.rb')
-rw-r--r--actionmailer/lib/action_mailer/delivery_methods.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb
index 34bfe6000a..f6321a240c 100644
--- a/actionmailer/lib/action_mailer/delivery_methods.rb
+++ b/actionmailer/lib/action_mailer/delivery_methods.rb
@@ -65,7 +65,10 @@ module ActionMailer
method ||= self.delivery_method
mail.delivery_handler = self
- if method.is_a?(Symbol)
+ case method
+ when NilClass
+ raise "Delivery method cannot be nil"
+ when Symbol
if klass = delivery_methods[method.to_sym]
mail.delivery_method(klass, send(:"#{method}_settings"))
else