aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorkennyj <kennyj@gmail.com>2012-04-04 01:21:35 +0900
committerkennyj <kennyj@gmail.com>2012-04-04 01:21:35 +0900
commitbfb9b7165ef4cb18835f65be600778bd8b1d6d11 (patch)
tree19340dcf17a55f884b4b8532eda7b48010672ba8 /activerecord/test/cases
parent0cc6c5fec235cca6d7eb85d4f849536db8566e93 (diff)
downloadrails-bfb9b7165ef4cb18835f65be600778bd8b1d6d11.tar.gz
rails-bfb9b7165ef4cb18835f65be600778bd8b1d6d11.tar.bz2
rails-bfb9b7165ef4cb18835f65be600778bd8b1d6d11.zip
Get a properly aliased_table_name, when we use a polymorphic association.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/associations/belongs_to_associations_test.rb1
1 files changed, 1 insertions, 0 deletions
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