diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-05-11 22:23:47 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-05-11 22:23:47 -0400 |
commit | a2875bec9a31702a385d2f34e66843ddbe4e9db2 (patch) | |
tree | 18e221e8a08f041efd7cb751d5114cf6430272f6 /activerecord/lib/active_record/associations.rb | |
parent | 00a9d4b91cccdd88146cbe716eca844dcdfa08e7 (diff) | |
download | rails-a2875bec9a31702a385d2f34e66843ddbe4e9db2.tar.gz rails-a2875bec9a31702a385d2f34e66843ddbe4e9db2.tar.bz2 rails-a2875bec9a31702a385d2f34e66843ddbe4e9db2.zip |
Use DependencyModule for included hooks in ActiveRecord
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 781a0290e8..e2dd36158f 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -77,6 +77,8 @@ module ActiveRecord # See ActiveRecord::Associations::ClassMethods for documentation. module Associations # :nodoc: + extend ActiveSupport::DependencyModule + # These classes will be loaded when associations are created. # So there is no need to eager load them. autoload :AssociationCollection, 'active_record/associations/association_collection' @@ -89,10 +91,6 @@ module ActiveRecord autoload :HasOneAssociation, 'active_record/associations/has_one_association' autoload :HasOneThroughAssociation, 'active_record/associations/has_one_through_association' - def self.included(base) - base.extend(ClassMethods) - end - # Clears out the association cache def clear_association_cache #:nodoc: self.class.reflect_on_all_associations.to_a.each do |assoc| |