aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-03-09 10:46:12 -0800
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-03-09 10:46:12 -0800
commit2357fa8ffadc7c119131fdbf8ad21117c8240d3c (patch)
tree771b41cefe0ad0376edbc898acb4e4e22bf84c38
parentb938f08a3352981f9a2876a60ff2600438b771c2 (diff)
parent3dffa0d2331a5e25bac2b046f81baac7f0535d68 (diff)
downloadrails-2357fa8ffadc7c119131fdbf8ad21117c8240d3c.tar.gz
rails-2357fa8ffadc7c119131fdbf8ad21117c8240d3c.tar.bz2
rails-2357fa8ffadc7c119131fdbf8ad21117c8240d3c.zip
Merge pull request #9630 from robertjwhitney/update_collection_docs
Update documentation for collection<< to reflect behavior for new parent objects.
-rw-r--r--activerecord/lib/active_record/associations.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 5b6f885122..519e9112b8 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1024,7 +1024,7 @@ module ActiveRecord
# [collection<<(object, ...)]
# Adds one or more objects to the collection by setting their foreign keys to the collection's primary key.
# Note that this operation instantly fires update sql without waiting for the save or update call on the
- # parent object.
+ # parent object, unless the parent object is a new record.
# [collection.delete(object, ...)]
# Removes one or more objects from the collection by setting their foreign keys to +NULL+.
# Objects will be in addition destroyed if they're associated with <tt>dependent: :destroy</tt>,
@@ -1433,7 +1433,7 @@ module ActiveRecord
# Adds one or more objects to the collection by creating associations in the join table
# (<tt>collection.push</tt> and <tt>collection.concat</tt> are aliases to this method).
# Note that this operation instantly fires update sql without waiting for the save or update call on the
- # parent object.
+ # parent object, unless the parent object is a new record.
# [collection.delete(object, ...)]
# Removes one or more objects from the collection by removing their associations from the join table.
# This does not destroy the objects.