diff options
Diffstat (limited to 'actionmailer/lib/action_mailer/delivery_method.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/delivery_method.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/actionmailer/lib/action_mailer/delivery_method.rb b/actionmailer/lib/action_mailer/delivery_method.rb index ffba3c418c..29a51afdc3 100644 --- a/actionmailer/lib/action_mailer/delivery_method.rb +++ b/actionmailer/lib/action_mailer/delivery_method.rb @@ -2,10 +2,10 @@ require "active_support/core_ext/class" module ActionMailer module DeliveryMethod - autoload :File, 'action_mailer/delivery_method/file' + autoload :File, 'action_mailer/delivery_method/file' autoload :Sendmail, 'action_mailer/delivery_method/sendmail' - autoload :Smtp, 'action_mailer/delivery_method/smtp' - autoload :Test, 'action_mailer/delivery_method/test' + autoload :Smtp, 'action_mailer/delivery_method/smtp' + autoload :Test, 'action_mailer/delivery_method/test' # Creates a new DeliveryMethod object according to the given options. # @@ -27,18 +27,17 @@ module ActionMailer def self.lookup_method(delivery_method) case delivery_method when Symbol - method_name = delivery_method.to_s.camelize + method_name = delivery_method.to_s.camelize method_class = ActionMailer::DeliveryMethod.const_get(method_name) - method_class.new() - when nil + method_class.new + when nil # default Smtp.new else delivery_method end end - # An abstract delivery method class. There are multiple delivery method - # classes, documented under + # An abstract delivery method class. There are multiple delivery method classes. # See the classes under the ActionMailer::DeliveryMethod, e.g. # ActionMailer::DeliveryMethod::Smtp. # Smtp is the default delivery method for production @@ -47,8 +46,8 @@ module ActionMailer # each delivery method exposes just one method # # delivery_method = ActionMailer::DeliveryMethod::Smtp.new - # # delivery_method.perform_delivery(mail) # send the mail via smtp + # class Method superclass_delegating_accessor :settings self.settings = {} |