diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-08-08 19:14:35 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-08-08 19:14:35 -0300 |
commit | 952014315926d370f2a0b681cb765948bf2e6883 (patch) | |
tree | 3abfe7e82554c09df4b2fe8a170e90cf1f0bcf02 /activerecord/test/models/company.rb | |
parent | ae9e1e9f6d08bbd5f5c1512b72d495168e9fa5e5 (diff) | |
parent | ed8a0a1c2370ab8715434ba824b2826d807401d5 (diff) | |
download | rails-952014315926d370f2a0b681cb765948bf2e6883.tar.gz rails-952014315926d370f2a0b681cb765948bf2e6883.tar.bz2 rails-952014315926d370f2a0b681cb765948bf2e6883.zip |
Merge commit 'rails/master'
Conflicts:
activerecord/test/cases/adapter_test.rb
activerecord/test/cases/method_scoping_test.rb
Diffstat (limited to 'activerecord/test/models/company.rb')
-rw-r--r-- | activerecord/test/models/company.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb index 22168468a6..1c05e523e0 100644 --- a/activerecord/test/models/company.rb +++ b/activerecord/test/models/company.rb @@ -73,12 +73,16 @@ class Firm < Company has_one :unvalidated_account, :foreign_key => "firm_id", :class_name => 'Account', :validate => false has_one :account_with_select, :foreign_key => "firm_id", :select => "id, firm_id", :class_name=>'Account' has_one :readonly_account, :foreign_key => "firm_id", :class_name => "Account", :readonly => true - has_one :account_using_primary_key, :primary_key => "firm_id", :class_name => "Account" + # added order by id as in fixtures there are two accounts for Rails Core + # Oracle tests were failing because of that as the second fixture was selected + has_one :account_using_primary_key, :primary_key => "firm_id", :class_name => "Account", :order => "id" has_one :deletable_account, :foreign_key => "firm_id", :class_name => "Account", :dependent => :delete end class DependentFirm < Company - has_one :account, :foreign_key => "firm_id", :dependent => :nullify + # added order by id as in fixtures there are two accounts for Rails Core + # Oracle tests were failing because of that as the second fixture was selected + has_one :account, :foreign_key => "firm_id", :dependent => :nullify, :order => "id" has_many :companies, :foreign_key => 'client_of', :order => "id", :dependent => :nullify end |