diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 399c1bf58a..4caa434fc0 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -886,7 +886,9 @@ module ActiveRecord # [:validate] # If false, don't validate the associated objects when saving the parent object. true by default. # [:autosave] - # If true, always save any loaded members and destroy members marked for destruction, when saving the parent object. Off by default. + # If true, always save the associated objects or destroy them if marked for destruction, when saving the parent object. + # If false, never save or destroy the associated objects. + # By default, only save associated objects that are new records. # [:inverse_of] # Specifies the name of the <tt>belongs_to</tt> association on the associated object that is the inverse of this <tt>has_many</tt> # association. Does not work in combination with <tt>:through</tt> or <tt>:as</tt> options. @@ -1001,7 +1003,9 @@ module ActiveRecord # [:validate] # If false, don't validate the associated object when saving the parent object. +false+ by default. # [:autosave] - # If true, always save the associated object or destroy it if marked for destruction, when saving the parent object. Off by default. + # If true, always save the associated object or destroy it if marked for destruction, when saving the parent object. + # If false, never save or destroy the associated object. + # By default, only save the associated object if it's a new record. # [:inverse_of] # Specifies the name of the <tt>belongs_to</tt> association on the associated object that is the inverse of this <tt>has_one</tt> # association. Does not work in combination with <tt>:through</tt> or <tt>:as</tt> options. @@ -1103,7 +1107,9 @@ module ActiveRecord # [:validate] # If false, don't validate the associated objects when saving the parent object. +false+ by default. # [:autosave] - # If true, always save the associated object or destroy it if marked for destruction, when saving the parent object. Off by default. + # If true, always save the associated object or destroy it if marked for destruction, when saving the parent object. + # If false, never save or destroy the associated object. + # By default, only save the associated object if it's a new record. # [:touch] # If true, the associated object will be touched (the updated_at/on attributes set to now) when this record is either saved or # destroyed. If you specify a symbol, that attribute will be updated with the current time instead of the updated_at/on attribute. @@ -1290,7 +1296,9 @@ module ActiveRecord # [:validate] # If false, don't validate the associated objects when saving the parent object. +true+ by default. # [:autosave] - # If true, always save any loaded members and destroy members marked for destruction, when saving the parent object. Off by default. + # If true, always save the associated objects or destroy them if marked for destruction, when saving the parent object. + # If false, never save or destroy the associated objects. + # By default, only save associated objects that are new records. # # Option examples: # has_and_belongs_to_many :projects |