diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-03-16 11:28:36 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-03-16 11:28:36 +0000 |
commit | 18eb80ccc7e932f9a6c00462ceaeea648631b120 (patch) | |
tree | d0bc7c4760197a4abdea3b3f008a1615436acf54 /activerecord/lib/active_record/associations/association_collection.rb | |
parent | 4185a4a5f5e53b55c9ba3757a837d33fb91f4091 (diff) | |
download | rails-18eb80ccc7e932f9a6c00462ceaeea648631b120.tar.gz rails-18eb80ccc7e932f9a6c00462ceaeea648631b120.tar.bz2 rails-18eb80ccc7e932f9a6c00462ceaeea648631b120.zip |
Merge docrails
Diffstat (limited to 'activerecord/lib/active_record/associations/association_collection.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index ad375be184..3aef1b21e9 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -143,6 +143,8 @@ module ActiveRecord end # Remove all records from this association + # + # See delete for more info. def delete_all load_target delete(@target) @@ -200,11 +202,11 @@ module ActiveRecord end end - # Destroy +records+ and remove from this association calling +before_remove+ - # and +after_remove+ callbacks. + # Destroy +records+ and remove them from this association calling + # +before_remove+ and +after_remove+ callbacks. # - # Note this method will always remove records from database ignoring the - # +:dependent+ option. + # Note that this method will _always_ remove records from the database + # ignoring the +:dependent+ option. def destroy(*records) remove_records(records) do |records, old_records| old_records.each { |record| record.destroy } @@ -226,7 +228,9 @@ module ActiveRecord self end - # Destory all the records from this association + # Destory all the records from this association. + # + # See destroy for more info. def destroy_all load_target destroy(@target) |