aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/aggregations.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-12-03 04:29:55 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-12-03 04:29:55 +0000
commit6abda696b5df14a9ab132c34311daaabe12030e6 (patch)
treeeb0cfad7daa4d46848e6ea10e1abd90ed93a3368 /activerecord/lib/active_record/aggregations.rb
parent57b7532b910f9258cad4111db79349d2d63be6d4 (diff)
downloadrails-6abda696b5df14a9ab132c34311daaabe12030e6.tar.gz
rails-6abda696b5df14a9ab132c34311daaabe12030e6.tar.bz2
rails-6abda696b5df14a9ab132c34311daaabe12030e6.zip
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
Diffstat (limited to 'activerecord/lib/active_record/aggregations.rb')
-rw-r--r--activerecord/lib/active_record/aggregations.rb5
1 files changed, 3 insertions, 2 deletions
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