diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-02-22 18:44:14 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-02-22 18:44:14 +0000 |
commit | c7d6d68f91f2cd2e04c2113cba44bef86dbad99f (patch) | |
tree | f9c4a03d7254d648718e671c4619f8637235b428 /activerecord/test/fixtures | |
parent | de54db3c1e2056322450e46c265b27792e99b2c7 (diff) | |
download | rails-c7d6d68f91f2cd2e04c2113cba44bef86dbad99f.tar.gz rails-c7d6d68f91f2cd2e04c2113cba44bef86dbad99f.tar.bz2 rails-c7d6d68f91f2cd2e04c2113cba44bef86dbad99f.zip |
Reflections don't attempt to resolve module nesting of association classes. Simplify type computation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures')
-rw-r--r-- | activerecord/test/fixtures/company_in_module.rb | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/activerecord/test/fixtures/company_in_module.rb b/activerecord/test/fixtures/company_in_module.rb index 52b5d37b8c..df476520b8 100644 --- a/activerecord/test/fixtures/company_in_module.rb +++ b/activerecord/test/fixtures/company_in_module.rb @@ -33,11 +33,25 @@ module MyApplication end end - + module Billing + class Firm < ActiveRecord::Base + self.table_name = 'companies' + end + + module Nested + class Firm < ActiveRecord::Base + self.table_name = 'companies' + end + end + class Account < ActiveRecord::Base - belongs_to :firm, :class_name => "MyApplication::Business::Firm" - + 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' + protected def validate errors.add_on_empty "credit_limit" |