title: How to generate a model with has_one contraint
body: <p>I want to create 2 models, where one belongs to another. I know the generate command to create a model that “belongs_to” another but I have no clue how to have the other model have “has_one”.</p>
  
  <p>Can I specify “has_one” in the generate command? Or do I manually add it to the model file after?</p>
  
  <p>This still confuses me since the child that “belongs_to” has the foreign key and the parent that “has_one” doesn’t have anything.</p>
  
  <p>And isn’t this a one-to-one relationship, and so not needed?</p>