2 require 'active_record'
4 RAILS_DEFAULT_LOGGER = nil unless defined? RAILS_DEFAULT_LOGGER
6 require 'has_many_polymorphs/reflection'
7 require 'has_many_polymorphs/association'
8 require 'has_many_polymorphs/class_methods'
10 require 'has_many_polymorphs/support_methods'
11 require 'has_many_polymorphs/base'
13 class ActiveRecord::Base
14 extend ActiveRecord::Associations::PolymorphicClassMethods
17 if ENV['HMP_DEBUG'] or ENV['RAILS_ENV'] =~ /development|test/ and ENV['USER'] == 'eweaver'
18 require 'has_many_polymorphs/debugging_tools'
21 if defined? Rails and RAILS_ENV and RAILS_ROOT
22 _logger_warn "rails environment detected"
23 require 'has_many_polymorphs/configuration'
24 require 'has_many_polymorphs/dependencies'
25 require 'has_many_polymorphs/autoload'
28 _logger_debug "loaded ok"