diff options
Diffstat (limited to 'actionmailer/lib/action_mailer.rb')
-rw-r--r-- | actionmailer/lib/action_mailer.rb | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 41ed399308..e7ad68e212 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -21,37 +21,38 @@ # 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 - - 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' - + extend ::ActiveSupport::Autoload + + autoload :AdvAttrAccessor + autoload :DeprecatedBody + autoload :Base + autoload :DeliveryMethod + autoload :Part + autoload :PartContainer + autoload :Quoting + autoload :TestCase + autoload :TestHelper end module Text + extend ActiveSupport::Autoload + autoload :Format, 'action_mailer/vendor/text_format' end module Net - autoload :SMTP, 'net/smtp' + extend ActiveSupport::Autoload + + autoload :SMTP end -autoload :MailHelper, 'action_mailer/mail_helper' gem 'mail', '>= 1.3.0' require 'mail' |