aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-04-11 16:18:36 -0700
committerJon Leighton <j@jonathanleighton.com>2012-04-11 16:18:36 -0700
commit19ecde00ff8a72c0c09685525c9d1eace79e8d75 (patch)
treecf3ddeedc5170a9233e6d8ec2ff8affa762ab696 /activerecord/test
parentddefdd70860f68545a6e4195b184a26a1303f517 (diff)
parentbfb9b7165ef4cb18835f65be600778bd8b1d6d11 (diff)
downloadrails-19ecde00ff8a72c0c09685525c9d1eace79e8d75.tar.gz
rails-19ecde00ff8a72c0c09685525c9d1eace79e8d75.tar.bz2
rails-19ecde00ff8a72c0c09685525c9d1eace79e8d75.zip
Merge pull request #5720 from kennyj/should_use_klass_method
Get a properly aliased_table_name, when we use a polymorphic association.
Diffstat (limited to 'activerecord/test')
-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