From e3dab67c44ed047cc91ccfcc17c5ee2bb9997be3 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Tue, 13 Mar 2007 05:23:18 +0000 Subject: Allow a polymorphic :source for has_many :through associations. Closes #7143 [protocool] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6408 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/fixtures/tag.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/fixtures/tag.rb') diff --git a/activerecord/test/fixtures/tag.rb b/activerecord/test/fixtures/tag.rb index c12ec0c188..a581b381e8 100644 --- a/activerecord/test/fixtures/tag.rb +++ b/activerecord/test/fixtures/tag.rb @@ -2,4 +2,6 @@ class Tag < ActiveRecord::Base has_many :taggings has_many :taggables, :through => :taggings has_one :tagging + + has_many :tagged_posts, :through => :taggings, :source => :taggable, :source_type => 'Post' end \ No newline at end of file -- cgit v1.2.3