diff options
author | wangjohn <wangjohn@mit.edu> | 2013-03-01 16:49:33 -0500 |
---|---|---|
committer | wangjohn <wangjohn@mit.edu> | 2013-05-07 23:24:43 -0400 |
commit | 26d19b4661f3d89a075b5f05d926c578ff0c730f (patch) | |
tree | c37e01fef7f849b1ae5de9a0167da9c111c52fc3 /activerecord/test/models/interest.rb | |
parent | a0f904143be570f079b03d0e242262cfa30dbcb7 (diff) | |
download | rails-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.rb | 2 |
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 |