Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 1475

Show
Ignore:
Timestamp:
06/21/05 17:11:01 (3 years ago)
Author:
david
Message:

Fixed docs #856

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/lib/active_record/associations.rb

    r1448 r1475  
    225225      # * <tt>Firm#clients.find</tt> (similar to <tt>Client.find(id, :conditions => "firm_id = #{id}")</tt>) 
    226226      # * <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>) 
    228228      # The declaration can also include an options hash to specialize the behavior of the association. 
    229229      #  
     
    377377      # * <tt>Post#author?</tt> (similar to <tt>post.author == some_author</tt>) 
    378378      # * <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>) 
    381381      # The declaration can also include an options hash to specialize the behavior of the association. 
    382382      #  
     
    453453      # in the two joined tables. As a consequence, having an "id" field in the join table usually has the undesirable 
    454454      # result of clobbering the "id" fields in either of the other two tables. 
    455       #  
    456455      # 
    457456      # Adds the following methods for retrieval and query.