From 4ef5af8d4ddad82295920cc7d83fba6cbb10ad71 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Mon, 16 Jul 2007 20:21:36 +0000 Subject: Change belongs_to so that the foreign_key assumption is taken from the association name, not the class name. Closes #8992 [hasmanyjosh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/associations_test.rb | 7 ------- 1 file changed, 7 deletions(-) (limited to 'activerecord/test/associations_test.rb') diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index bf6d8301a2..0db8d91099 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -409,13 +409,6 @@ class HasOneAssociationsTest < Test::Unit::TestCase end end - def test_deprecated_inferred_foreign_key - assert_not_deprecated { Company.belongs_to :firm } - assert_not_deprecated { Company.belongs_to :client, :foreign_key => "firm_id" } - assert_not_deprecated { Company.belongs_to :firm, :class_name => "Firm", :foreign_key => "client_of" } - assert_deprecated("inferred foreign_key name") { Company.belongs_to :client, :class_name => "Firm" } - end - end -- cgit v1.2.3