From 99c103be1165da9c8299bc0977188ecf167e06a5 Mon Sep 17 00:00:00 2001 From: Ruy Asan Date: Fri, 1 May 2009 13:09:29 -0700 Subject: Fixed bug with polymorphic has_one :as pointing to an STI record [#2594 state:committed] Signed-off-by: Jeremy Kemper --- activerecord/test/models/organization.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/organization.rb b/activerecord/test/models/organization.rb index d79d5037c8..5d1308354d 100644 --- a/activerecord/test/models/organization.rb +++ b/activerecord/test/models/organization.rb @@ -1,4 +1,8 @@ class Organization < ActiveRecord::Base has_many :member_details has_many :members, :through => :member_details +end + +class SponsorableOrganization < Organization + has_one :sponsor, :as => :sponsorable end \ No newline at end of file -- cgit v1.2.3