From 1d4d721782dd1d89435f79261b954eb0f163b312 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 21 Jun 2005 17:11:01 +0000 Subject: Fixed docs #856 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1475 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/associations.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 610f1e3667..fffafb2a29 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -224,7 +224,7 @@ module ActiveRecord # * Firm#clients.size (similar to Client.count "firm_id = #{id}") # * Firm#clients.find (similar to Client.find(id, :conditions => "firm_id = #{id}")) # * Firm#clients.build (similar to Client.new("firm_id" => id)) - # * Firm#clients.create (similar to c = Client.new("client_id" => id); c.save; c) + # * Firm#clients.create (similar to c = Client.new("firm_id" => id); c.save; c) # The declaration can also include an options hash to specialize the behavior of the association. # # Options are: @@ -376,8 +376,8 @@ module ActiveRecord # * Post#author=(author) (similar to post.author_id = author.id) # * Post#author? (similar to post.author == some_author) # * Post#author.nil? - # * Post#build_author (similar to Author.new("post_id" => id)) - # * Post#create_author (similar to b = Author.new("post_id" => id); b.save; b) + # * Post#build_author (similar to post.author = Author.new) + # * Post#create_author (similar to post.author = Author.new; post.author.save; post.author) # The declaration can also include an options hash to specialize the behavior of the association. # # Options are: @@ -452,7 +452,6 @@ module ActiveRecord # that you want available on retrieval. Note that any fields in the join table will override matching field names # in the two joined tables. As a consequence, having an "id" field in the join table usually has the undesirable # result of clobbering the "id" fields in either of the other two tables. - # # # Adds the following methods for retrieval and query. # +collection+ is replaced with the symbol passed as the first argument, so -- cgit v1.2.3