diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-15 07:02:05 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-15 07:02:05 +0000 |
commit | 3f1acf49bd4cfa902388f000ca96c848c3666017 (patch) | |
tree | af197c1f4ea786e76da1f0679225572ea1953a58 /activerecord/test/fixtures/company_in_module.rb | |
parent | d0c000ab9e90be4896744cb6ec107dffa573f2dd (diff) | |
download | rails-3f1acf49bd4cfa902388f000ca96c848c3666017.tar.gz rails-3f1acf49bd4cfa902388f000ca96c848c3666017.tar.bz2 rails-3f1acf49bd4cfa902388f000ca96c848c3666017.zip |
Deprecation tests. Remove warnings for dynamic finders and for the foo_count ethod if it's also an attribute.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5116 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures/company_in_module.rb')
-rw-r--r-- | activerecord/test/fixtures/company_in_module.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/activerecord/test/fixtures/company_in_module.rb b/activerecord/test/fixtures/company_in_module.rb index 7372134ae9..1eb2b2bd93 100644 --- a/activerecord/test/fixtures/company_in_module.rb +++ b/activerecord/test/fixtures/company_in_module.rb @@ -46,11 +46,13 @@ module MyApplication end class Account < ActiveRecord::Base - belongs_to :firm, :class_name => 'MyApplication::Business::Firm' - belongs_to :qualified_billing_firm, :class_name => 'MyApplication::Billing::Firm' - belongs_to :unqualified_billing_firm, :class_name => 'Firm' - belongs_to :nested_qualified_billing_firm, :class_name => 'MyApplication::Billing::Nested::Firm' - belongs_to :nested_unqualified_billing_firm, :class_name => 'Nested::Firm' + with_options(:foreign_key => :firm_id) do |i| + i.belongs_to :firm, :class_name => 'MyApplication::Business::Firm' + i.belongs_to :qualified_billing_firm, :class_name => 'MyApplication::Billing::Firm' + i.belongs_to :unqualified_billing_firm, :class_name => 'Firm' + i.belongs_to :nested_qualified_billing_firm, :class_name => 'MyApplication::Billing::Nested::Firm' + i.belongs_to :nested_unqualified_billing_firm, :class_name => 'Nested::Firm' + end protected def validate |