Created
          March 23, 2015 21:09 
        
      - 
      
- 
        Save noahmatisoff/03cc524bcc5084248a9e to your computer and use it in GitHub Desktop. 
    Active Record self-referential one to one relationship
  
        
  
    
      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 characters
    
  
  
    
  | has_one :twin_model, class_name: "Model", foreign_key: :model_id | |
| belongs_to :twin, class_name: "Model", foreign_key: :model_id | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment