aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/interest.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/interest.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/interest.rb')
-rw-r--r--activerecord/test/models/interest.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/models/interest.rb b/activerecord/test/models/interest.rb
index d5d9226204..f772bb1c7f 100644
--- a/activerecord/test/models/interest.rb
+++ b/activerecord/test/models/interest.rb
@@ -1,5 +1,5 @@
class Interest < ActiveRecord::Base
- belongs_to :man, :inverse_of => :interests
+ belongs_to :man, :inverse_of => :interests, :automatic_inverse_of => false
belongs_to :polymorphic_man, :polymorphic => true, :inverse_of => :polymorphic_interests
belongs_to :zine, :inverse_of => :interests
end