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/lib/active_record/associations/builder/singular_association.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/lib/active_record/associations/builder/singular_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/singular_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/builder/singular_association.rb b/activerecord/lib/active_record/associations/builder/singular_association.rb index 6a5830e57f..f06426a09d 100644 --- a/activerecord/lib/active_record/associations/builder/singular_association.rb +++ b/activerecord/lib/active_record/associations/builder/singular_association.rb @@ -1,7 +1,7 @@ module ActiveRecord::Associations::Builder class SingularAssociation < Association #:nodoc: def valid_options - super + [:remote, :dependent, :counter_cache, :primary_key, :inverse_of] + super + [:remote, :dependent, :counter_cache, :primary_key, :inverse_of, :automatic_inverse_of] end def constructable? |