diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-21 17:11:01 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-21 17:11:01 +0000 |
commit | 1d4d721782dd1d89435f79261b954eb0f163b312 (patch) | |
tree | 82785ec45e6293b81f92418946c57401c4eba802 | |
parent | 8e56e09018d658393692d3b4c3b1e0c248fd01ca (diff) | |
download | rails-1d4d721782dd1d89435f79261b954eb0f163b312.tar.gz rails-1d4d721782dd1d89435f79261b954eb0f163b312.tar.bz2 rails-1d4d721782dd1d89435f79261b954eb0f163b312.zip |
Fixed docs #856
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1475 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 7 |
1 files changed, 3 insertions, 4 deletions
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 # * <tt>Firm#clients.size</tt> (similar to <tt>Client.count "firm_id = #{id}"</tt>) # * <tt>Firm#clients.find</tt> (similar to <tt>Client.find(id, :conditions => "firm_id = #{id}")</tt>) # * <tt>Firm#clients.build</tt> (similar to <tt>Client.new("firm_id" => id)</tt>) - # * <tt>Firm#clients.create</tt> (similar to <tt>c = Client.new("client_id" => id); c.save; c</tt>) + # * <tt>Firm#clients.create</tt> (similar to <tt>c = Client.new("firm_id" => id); c.save; c</tt>) # The declaration can also include an options hash to specialize the behavior of the association. # # Options are: @@ -376,8 +376,8 @@ module ActiveRecord # * <tt>Post#author=(author)</tt> (similar to <tt>post.author_id = author.id</tt>) # * <tt>Post#author?</tt> (similar to <tt>post.author == some_author</tt>) # * <tt>Post#author.nil?</tt> - # * <tt>Post#build_author</tt> (similar to <tt>Author.new("post_id" => id)</tt>) - # * <tt>Post#create_author</tt> (similar to <tt>b = Author.new("post_id" => id); b.save; b</tt>) + # * <tt>Post#build_author</tt> (similar to <tt>post.author = Author.new</tt>) + # * <tt>Post#create_author</tt> (similar to <tt>post.author = Author.new; post.author.save; post.author</tt>) # 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 |