From ace20bd25e3818b7f29c222643dd445c48b36425 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 22 Dec 2009 17:27:37 -0600 Subject: Flip deferrable autoload convention --- actionmailer/lib/action_mailer.rb | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'actionmailer/lib/action_mailer.rb') diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index f439eb175c..6539451bea 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -30,29 +30,34 @@ require 'action_view' module ActionMailer extend ::ActiveSupport::Autoload - autoload :AdvAttrAccessor - autoload :DeprecatedBody - autoload :Base - autoload :DeliveryMethod - autoload :MailHelper - autoload :Part - autoload :PartContainer - autoload :Quoting - autoload :TestHelper - autoload :Utils + eager_autoload do + autoload :AdvAttrAccessor + autoload :DeprecatedBody + autoload :Base + autoload :DeliveryMethod + autoload :MailHelper + autoload :Part + autoload :PartContainer + autoload :Quoting + autoload :TestHelper + autoload :Utils + end end module Text extend ActiveSupport::Autoload - autoload :Format, 'action_mailer/vendor/text_format' + eager_autoload do + autoload :Format, 'action_mailer/vendor/text_format' + end end module Net extend ActiveSupport::Autoload - autoload :SMTP + eager_autoload do + autoload :SMTP + end end - require 'action_mailer/vendor/tmail' -- cgit v1.2.3 From 2e4e8d156ca1a2f3fe2f587956097621433514f8 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 22 Dec 2009 17:33:00 -0600 Subject: All AM modules are safe to defer --- actionmailer/lib/action_mailer.rb | 40 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 30 deletions(-) (limited to 'actionmailer/lib/action_mailer.rb') diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 6539451bea..d7bbbbd78c 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -30,34 +30,14 @@ require 'action_view' 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' -- cgit v1.2.3