Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 9th, 2012  |  syntax: None  |  size: 0.23 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. what does this rails syntax mean?
  2. @user = User.new
  3. @user.build_company
  4.        
  5. class User < ActiveRecord::Base
  6.   has_one :company
  7.  
  8. class Company < ActiveRecord::Base
  9.    belongs_to :user
  10.        
  11. @parent.build_child
  12.        
  13. @parent.children.build