diff options
author | wangjohn <wangjohn@mit.edu> | 2013-06-07 20:59:27 -0700 |
---|---|---|
committer | wangjohn <wangjohn@mit.edu> | 2013-06-08 10:16:51 -0700 |
commit | d6b03a376787ec9c9e934e5688a38c576f2e39b7 (patch) | |
tree | 33de7e28e491764e0ef27ac81ebb0322540cc12c /activerecord/lib/active_record/nested_attributes.rb | |
parent | b7f9de27f0558d6144f982cae83f32ca85a07f7e (diff) | |
download | rails-d6b03a376787ec9c9e934e5688a38c576f2e39b7.tar.gz rails-d6b03a376787ec9c9e934e5688a38c576f2e39b7.tar.bz2 rails-d6b03a376787ec9c9e934e5688a38c576f2e39b7.zip |
Getting rid of the +automatic_inverse_of: false+ option in associations in favor
of using +inverse_of: false+ option. Changing the documentation and
adding a CHANGELOG entry for the automatic inverse detection feature.
Diffstat (limited to 'activerecord/lib/active_record/nested_attributes.rb')
-rw-r--r-- | activerecord/lib/active_record/nested_attributes.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb index 8bdaeef924..0e8822d63f 100644 --- a/activerecord/lib/active_record/nested_attributes.rb +++ b/activerecord/lib/active_record/nested_attributes.rb @@ -230,6 +230,10 @@ module ActiveRecord # validates_presence_of :member # end # + # Note that if you do not specify the <tt>inverse_of</tt> option, then + # Active Record will try to automatically guess the inverse association + # based on heuristics. + # # For one-to-one nested associations, if you build the new (in-memory) # child object yourself before assignment, then this module will not # overwrite it, e.g.: |