aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-07-06 10:09:54 -0400
committerNeeraj Singh <neerajdotname@gmail.com>2010-07-06 10:09:54 -0400
commitc1fc59c7ac1726f54d54b2896004997892e15ec9 (patch)
tree6416e301b7d28ca4f36ac05d145971aa1d1633ff
parentd10aaefcfd4141144eaf971c0560da5631e3dff5 (diff)
downloadrails-c1fc59c7ac1726f54d54b2896004997892e15ec9.tar.gz
rails-c1fc59c7ac1726f54d54b2896004997892e15ec9.tar.bz2
rails-c1fc59c7ac1726f54d54b2896004997892e15ec9.zip
added more info about << operation in associations
-rw-r--r--activerecord/lib/active_record/associations.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 4caa434fc0..49da8595b2 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -763,6 +763,8 @@ module ActiveRecord
# An empty array is returned if none are found.
# [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.
# [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>,
@@ -1186,6 +1188,8 @@ module ActiveRecord
# [collection<<(object, ...)]
# 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.
# [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.