aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/company.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-01-16 18:25:50 +0000
committerAaron Patterson <aaron.patterson@gmail.com>2011-01-16 13:43:53 -0800
commit52c47556b7cf55549f97f3cfd5f69b2563198eac (patch)
treec43cfba16b8e7c0944d42bbc4224b9a178ec7a7f /activerecord/test/models/company.rb
parent8f88a2841682d95c7bcce7ee76c156ec24bf82d8 (diff)
downloadrails-52c47556b7cf55549f97f3cfd5f69b2563198eac.tar.gz
rails-52c47556b7cf55549f97f3cfd5f69b2563198eac.tar.bz2
rails-52c47556b7cf55549f97f3cfd5f69b2563198eac.zip
Add create_association! for belongs_to
Diffstat (limited to 'activerecord/test/models/company.rb')
-rw-r--r--activerecord/test/models/company.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb
index f6e7a5ccf7..e8a126fb28 100644
--- a/activerecord/test/models/company.rb
+++ b/activerecord/test/models/company.rb
@@ -124,6 +124,7 @@ class Client < Company
belongs_to :firm_with_primary_key_symbols, :class_name => "Firm", :primary_key => :name, :foreign_key => :firm_name
belongs_to :readonly_firm, :class_name => "Firm", :foreign_key => "firm_id", :readonly => true
has_many :accounts, :through => :firm
+ belongs_to :account
# Record destruction so we can test whether firm.clients.clear has
# is calling client.destroy, deleting from the database, or setting