aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/lib/action_mailer.rb')
-rw-r--r--actionmailer/lib/action_mailer.rb37
1 files changed, 14 insertions, 23 deletions
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb
index 23f04a11ba..55ddbb24f4 100644
--- a/actionmailer/lib/action_mailer.rb
+++ b/actionmailer/lib/action_mailer.rb
@@ -21,36 +21,27 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++
-actionpack_path = "#{File.dirname(__FILE__)}/../../actionpack/lib"
-$:.unshift(actionpack_path) if File.directory?(actionpack_path)
+actionpack_path = File.expand_path('../../../actionpack/lib', __FILE__)
+$:.unshift(actionpack_path) if File.directory?(actionpack_path) && !$:.include?(actionpack_path)
+
require 'action_controller'
require 'action_view'
module ActionMailer
- def self.load_all!
- [Base, Part, ::Text::Format, ::Net::SMTP]
- end
+ extend ::ActiveSupport::Autoload
- autoload :AdvAttrAccessor, 'action_mailer/adv_attr_accessor'
- autoload :DeprecatedBody, 'action_mailer/deprecated_body'
- autoload :Base, 'action_mailer/base'
- autoload :DeliveryMethod, 'action_mailer/delivery_method'
- autoload :Part, 'action_mailer/part'
- autoload :PartContainer, 'action_mailer/part_container'
- autoload :Quoting, 'action_mailer/quoting'
- autoload :TestCase, 'action_mailer/test_case'
- autoload :TestHelper, 'action_mailer/test_helper'
- autoload :Utils, 'action_mailer/utils'
+ autoload :AdvAttrAccessor
+ autoload :Base
+ autoload :DeliveryMethod
+ autoload :DeprecatedBody
+ autoload :MailHelper
+ autoload :Quoting
+ autoload :TestCase
+ autoload :TestHelper
end
module Text
- autoload :Format, 'action_mailer/vendor/text_format'
-end
+ extend ActiveSupport::Autoload
-module Net
- autoload :SMTP, 'net/smtp'
+ autoload :Format, 'action_mailer/vendor/text_format'
end
-
-autoload :MailHelper, 'action_mailer/mail_helper'
-
-require 'action_mailer/vendor/tmail'