Skip to content

Commit

Permalink
Doc fixes (closes #6325)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5254 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Oct 9, 2006
1 parent a307b8c commit cb0837a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion activerecord/lib/active_record/associations.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ module ClassMethods
# * <tt>collection.delete(object, ...)</tt> - removes one or more objects from the collection by setting their foreign keys to NULL. # * <tt>collection.delete(object, ...)</tt> - 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. # This will also destroy the objects if they're declared as belongs_to and dependent on this model.
# * <tt>collection=objects</tt> - replaces the collections content by deleting and adding objects as appropriate. # * <tt>collection=objects</tt> - replaces the collections content by deleting and adding objects as appropriate.
# * <tt>collection_singular_ids</tt> - returns an array of the associated objects ids
# * <tt>collection_singular_ids=ids</tt> - replace the collection by the objects identified by the primary keys in +ids+ # * <tt>collection_singular_ids=ids</tt> - replace the collection by the objects identified by the primary keys in +ids+
# * <tt>collection.clear</tt> - removes every object from the collection. This destroys the associated objects if they # * <tt>collection.clear</tt> - removes every object from the collection. This destroys the associated objects if they
# are <tt>:dependent</tt>, deletes them directly from the database if they are <tt>:dependent => :delete_all</tt>, # are <tt>:dependent</tt>, deletes them directly from the database if they are <tt>:dependent => :delete_all</tt>,
Expand All @@ -458,6 +459,7 @@ module ClassMethods
# * <tt>Firm#clients<<</tt> # * <tt>Firm#clients<<</tt>
# * <tt>Firm#clients.delete</tt> # * <tt>Firm#clients.delete</tt>
# * <tt>Firm#clients=</tt> # * <tt>Firm#clients=</tt>
# * <tt>Firm#client_ids</tt>
# * <tt>Firm#client_ids=</tt> # * <tt>Firm#client_ids=</tt>
# * <tt>Firm#clients.clear</tt> # * <tt>Firm#clients.clear</tt>
# * <tt>Firm#clients.empty?</tt> (similar to <tt>firm.clients.size == 0</tt>) # * <tt>Firm#clients.empty?</tt> (similar to <tt>firm.clients.size == 0</tt>)
Expand Down Expand Up @@ -746,6 +748,7 @@ def belongs_to(association_id, options = {})
# * <tt>collection.delete(object, ...)</tt> - removes one or more objects from the collection by removing their associations from the join table. # * <tt>collection.delete(object, ...)</tt> - removes one or more objects from the collection by removing their associations from the join table.
# This does not destroy the objects. # This does not destroy the objects.
# * <tt>collection=objects</tt> - replaces the collections content by deleting and adding objects as appropriate. # * <tt>collection=objects</tt> - replaces the collections content by deleting and adding objects as appropriate.
# * <tt>collection_singular_ids</tt> - returns an array of the associated objects ids
# * <tt>collection_singular_ids=ids</tt> - replace the collection by the objects identified by the primary keys in +ids+ # * <tt>collection_singular_ids=ids</tt> - replace the collection by the objects identified by the primary keys in +ids+
# * <tt>collection.clear</tt> - removes every object from the collection. This does not destroy the objects. # * <tt>collection.clear</tt> - removes every object from the collection. This does not destroy the objects.
# * <tt>collection.empty?</tt> - returns true if there are no associated objects. # * <tt>collection.empty?</tt> - returns true if there are no associated objects.
Expand All @@ -760,9 +763,9 @@ def belongs_to(association_id, options = {})
# Example: An Developer class declares <tt>has_and_belongs_to_many :projects</tt>, which will add: # Example: An Developer class declares <tt>has_and_belongs_to_many :projects</tt>, which will add:
# * <tt>Developer#projects</tt> # * <tt>Developer#projects</tt>
# * <tt>Developer#projects<<</tt> # * <tt>Developer#projects<<</tt>
# * <tt>Developer#projects.push_with_attributes</tt>
# * <tt>Developer#projects.delete</tt> # * <tt>Developer#projects.delete</tt>
# * <tt>Developer#projects=</tt> # * <tt>Developer#projects=</tt>
# * <tt>Developer#project_ids</tt>
# * <tt>Developer#project_ids=</tt> # * <tt>Developer#project_ids=</tt>
# * <tt>Developer#projects.clear</tt> # * <tt>Developer#projects.clear</tt>
# * <tt>Developer#projects.empty?</tt> # * <tt>Developer#projects.empty?</tt>
Expand Down

0 comments on commit cb0837a

Please sign in to comment.