Permalink
Browse files

All AM modules are safe to defer

  • Loading branch information...
1 parent ace20bd commit 2e4e8d156ca1a2f3fe2f587956097621433514f8 @josh josh committed Dec 22, 2009
@@ -30,34 +30,14 @@
module ActionMailer
extend ::ActiveSupport::Autoload
- eager_autoload do
- autoload :AdvAttrAccessor
- autoload :DeprecatedBody
- autoload :Base
- autoload :DeliveryMethod
- autoload :MailHelper
- autoload :Part
- autoload :PartContainer
- autoload :Quoting
- autoload :TestHelper
- autoload :Utils
- end
+ autoload :AdvAttrAccessor
+ autoload :DeprecatedBody
+ autoload :Base
+ autoload :DeliveryMethod
+ autoload :MailHelper
+ autoload :Part
+ autoload :PartContainer
+ autoload :Quoting
+ autoload :TestHelper
+ autoload :Utils
end
-
-module Text
- extend ActiveSupport::Autoload
-
- eager_autoload do
- autoload :Format, 'action_mailer/vendor/text_format'
- end
-end
-
-module Net
- extend ActiveSupport::Autoload
-
- eager_autoload do
- autoload :SMTP
- end
-end
-
-require 'action_mailer/vendor/tmail'
@@ -1,4 +1,7 @@
require 'active_support/core_ext/class'
+require 'action_mailer/part'
+require 'action_mailer/vendor/text_format'
+require 'action_mailer/vendor/tmail'
module ActionMailer #:nodoc:
# Action Mailer allows you to send email from your application using a mailer model and views.
@@ -1,7 +1,7 @@
-require "active_support/core_ext/class"
+require 'active_support/core_ext/class'
+
module ActionMailer
module DeliveryMethod
-
autoload :File, 'action_mailer/delivery_method/file'
autoload :Sendmail, 'action_mailer/delivery_method/sendmail'
autoload :Smtp, 'action_mailer/delivery_method/smtp'
@@ -52,6 +52,5 @@ class Method
superclass_delegating_accessor :settings
self.settings = {}
end
-
end
end
@@ -1,8 +1,9 @@
+require 'net/smtp'
+
module ActionMailer
module DeliveryMethod
# A delivery method implementation which sends via smtp.
class Smtp < Method
-
self.settings = {
:address => "localhost",
:port => 25,
@@ -26,6 +27,5 @@ def perform_delivery(mail)
end
end
end
-
end
end

0 comments on commit 2e4e8d1

Please sign in to comment.