aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/builder/has_many.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/lib/active_record/associations/builder/has_many.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/lib/active_record/associations/builder/has_many.rb')
-rw-r--r--activerecord/lib/active_record/associations/builder/has_many.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/builder/has_many.rb b/activerecord/lib/active_record/associations/builder/has_many.rb
index 0d1bdd21ee..429def5455 100644
--- a/activerecord/lib/active_record/associations/builder/has_many.rb
+++ b/activerecord/lib/active_record/associations/builder/has_many.rb
@@ -5,7 +5,7 @@ module ActiveRecord::Associations::Builder
end
def valid_options
- super + [:primary_key, :dependent, :as, :through, :source, :source_type, :inverse_of, :counter_cache]
+ super + [:primary_key, :dependent, :as, :through, :source, :source_type, :inverse_of, :automatic_inverse_of, :counter_cache]
end
def valid_dependent_options