From bfb9b7165ef4cb18835f65be600778bd8b1d6d11 Mon Sep 17 00:00:00 2001 From: kennyj Date: Wed, 4 Apr 2012 01:21:35 +0900 Subject: Get a properly aliased_table_name, when we use a polymorphic association. --- activerecord/test/cases/associations/belongs_to_associations_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb index 1160d236c9..9dd041af81 100644 --- a/activerecord/test/cases/associations/belongs_to_associations_test.rb +++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb @@ -168,6 +168,7 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase sponsor.sponsorable = Member.new :name => "Bert" assert_equal Member, sponsor.association(:sponsorable).send(:klass) + assert_equal "members", sponsor.association(:sponsorable).aliased_table_name end def test_with_polymorphic_and_condition -- cgit v1.2.3