Created
December 22, 2010 02:17
Revisions
-
jonhoman renamed this gist
Dec 22, 2010 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jonhoman created this gist
Dec 22, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ class Company < ActiveRecord::Base has_many :employees end class Employee < ActiveRecord::Base has_one :position belongs_to :company end class Position < ActiveRecord::Base belongs_to :employee end ======================================= # time to build mulit-model form company.employees.build employee.build_position # why the inconsistent API???