aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/association_collection.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-10-21 18:33:40 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-10-21 18:33:40 +0100
commita03e2b356c66ddc8809fa2b23a2a7d652f173b8b (patch)
treeab8552913475bf94a78e4cbfbae804b2ecd9eca2 /activerecord/lib/active_record/associations/association_collection.rb
parent18542c9e00209679bdaacf64075819fb887ec856 (diff)
downloadrails-a03e2b356c66ddc8809fa2b23a2a7d652f173b8b.tar.gz
rails-a03e2b356c66ddc8809fa2b23a2a7d652f173b8b.tar.bz2
rails-a03e2b356c66ddc8809fa2b23a2a7d652f173b8b.zip
Merge with docrails. Also add a rake task to generate guides in your rails application :
rake doc:guides The rake task will generate guides inside doc/guides directory of your application. Open index.html to browse.
Diffstat (limited to 'activerecord/lib/active_record/associations/association_collection.rb')
-rw-r--r--activerecord/lib/active_record/associations/association_collection.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb
index b7f37e53f7..0ff91fbdf8 100644
--- a/activerecord/lib/active_record/associations/association_collection.rb
+++ b/activerecord/lib/active_record/associations/association_collection.rb
@@ -183,7 +183,13 @@ module ActiveRecord
end
- # Remove +records+ from this association. Does not destroy +records+.
+ # Removes +records+ from this association calling +before_remove+ and
+ # +after_remove+ callbacks.
+ #
+ # This method is abstract in the sense that +delete_records+ has to be
+ # provided by descendants. Note this method does not imply the records
+ # are actually removed from the database, that depends precisely on
+ # +delete_records+. They are in any case removed from the collection.
def delete(*records)
records = flatten_deeper(records)
records.each { |record| raise_on_type_mismatch(record) }