aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/member.rb
diff options
context:
space:
mode:
authorwangjohn <wangjohn@mit.edu>2013-03-01 16:49:33 -0500
committerwangjohn <wangjohn@mit.edu>2013-05-07 23:24:43 -0400
commit26d19b4661f3d89a075b5f05d926c578ff0c730f (patch)
treec37e01fef7f849b1ae5de9a0167da9c111c52fc3 /activerecord/test/models/member.rb
parenta0f904143be570f079b03d0e242262cfa30dbcb7 (diff)
downloadrails-26d19b4661f3d89a075b5f05d926c578ff0c730f.tar.gz
rails-26d19b4661f3d89a075b5f05d926c578ff0c730f.tar.bz2
rails-26d19b4661f3d89a075b5f05d926c578ff0c730f.zip
Created a method to automatically find inverse associations and cache
the results. Added tests to check to make sure that inverse associations are automatically found when has_many, has_one, or belongs_to associations are defined.
Diffstat (limited to 'activerecord/test/models/member.rb')
-rw-r--r--activerecord/test/models/member.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/models/member.rb b/activerecord/test/models/member.rb
index 1134b09d8b..b81304b8e0 100644
--- a/activerecord/test/models/member.rb
+++ b/activerecord/test/models/member.rb
@@ -9,7 +9,7 @@ class Member < ActiveRecord::Base
has_one :hairy_club, -> { where :clubs => {:name => "Moustache and Eyebrow Fancier Club"} }, :through => :membership, :source => :club
has_one :sponsor, :as => :sponsorable
has_one :sponsor_club, :through => :sponsor
- has_one :member_detail
+ has_one :member_detail, :automatic_inverse_of => false
has_one :organization, :through => :member_detail
belongs_to :member_type