From cb0837a2b7e7d5ba46494acaecc0f5798964ecf7 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 9 Oct 2006 01:32:11 +0000 Subject: Doc fixes (closes #6325) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5254 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/associations.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index c73b5db51e..961f7cc30e 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -439,6 +439,7 @@ module ActiveRecord # * collection.delete(object, ...) - removes one or more objects from the collection by setting their foreign keys to NULL. # This will also destroy the objects if they're declared as belongs_to and dependent on this model. # * collection=objects - replaces the collections content by deleting and adding objects as appropriate. + # * collection_singular_ids - returns an array of the associated objects ids # * collection_singular_ids=ids - replace the collection by the objects identified by the primary keys in +ids+ # * collection.clear - removes every object from the collection. This destroys the associated objects if they # are :dependent, deletes them directly from the database if they are :dependent => :delete_all, @@ -458,6 +459,7 @@ module ActiveRecord # * Firm#clients<< # * Firm#clients.delete # * Firm#clients= + # * Firm#client_ids # * Firm#client_ids= # * Firm#clients.clear # * Firm#clients.empty? (similar to firm.clients.size == 0) @@ -746,6 +748,7 @@ module ActiveRecord # * 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. # * collection=objects - replaces the collections content by deleting and adding objects as appropriate. + # * collection_singular_ids - returns an array of the associated objects ids # * collection_singular_ids=ids - replace the collection by the objects identified by the primary keys in +ids+ # * collection.clear - removes every object from the collection. This does not destroy the objects. # * collection.empty? - returns true if there are no associated objects. @@ -760,9 +763,9 @@ module ActiveRecord # Example: An Developer class declares has_and_belongs_to_many :projects, which will add: # * Developer#projects # * Developer#projects<< - # * Developer#projects.push_with_attributes # * Developer#projects.delete # * Developer#projects= + # * Developer#project_ids # * Developer#project_ids= # * Developer#projects.clear # * Developer#projects.empty? -- cgit v1.2.3