Changeset 1475
- Timestamp:
- 06/21/05 17:11:01 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/lib/active_record/associations.rb
r1448 r1475 225 225 # * <tt>Firm#clients.find</tt> (similar to <tt>Client.find(id, :conditions => "firm_id = #{id}")</tt>) 226 226 # * <tt>Firm#clients.build</tt> (similar to <tt>Client.new("firm_id" => id)</tt>) 227 # * <tt>Firm#clients.create</tt> (similar to <tt>c = Client.new(" client_id" => id); c.save; c</tt>)227 # * <tt>Firm#clients.create</tt> (similar to <tt>c = Client.new("firm_id" => id); c.save; c</tt>) 228 228 # The declaration can also include an options hash to specialize the behavior of the association. 229 229 # … … 377 377 # * <tt>Post#author?</tt> (similar to <tt>post.author == some_author</tt>) 378 378 # * <tt>Post#author.nil?</tt> 379 # * <tt>Post#build_author</tt> (similar to <tt> Author.new("post_id" => id)</tt>)380 # * <tt>Post#create_author</tt> (similar to <tt> b = Author.new("post_id" => id); b.save; b</tt>)379 # * <tt>Post#build_author</tt> (similar to <tt>post.author = Author.new</tt>) 380 # * <tt>Post#create_author</tt> (similar to <tt>post.author = Author.new; post.author.save; post.author</tt>) 381 381 # The declaration can also include an options hash to specialize the behavior of the association. 382 382 # … … 453 453 # in the two joined tables. As a consequence, having an "id" field in the join table usually has the undesirable 454 454 # result of clobbering the "id" fields in either of the other two tables. 455 #456 455 # 457 456 # Adds the following methods for retrieval and query.