From 6abda696b5df14a9ab132c34311daaabe12030e6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 3 Dec 2005 04:29:55 +0000 Subject: Added preliminary support for join models [DHH] Added preliminary support for polymorphic associations [DHH] Refactored associations to use reflections to get DRYer, beware, major refactoring -- double check before deploying anything with this (all tests pass, but..) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/aggregations.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/aggregations.rb') diff --git a/activerecord/lib/active_record/aggregations.rb b/activerecord/lib/active_record/aggregations.rb index 6824df9b37..0970eaceee 100644 --- a/activerecord/lib/active_record/aggregations.rb +++ b/activerecord/lib/active_record/aggregations.rb @@ -1,7 +1,6 @@ module ActiveRecord module Aggregations # :nodoc: - def self.append_features(base) - super + def self.included(base) base.extend(ClassMethods) end @@ -128,6 +127,8 @@ module ActiveRecord reader_method(name, class_name, mapping) writer_method(name, class_name, mapping) + + create_reflection(:composed_of, part_id, options, self) end private -- cgit v1.2.3