title: creating a user_id index rails
body: <p>how do I create a user_id column for mapping the id of one databse index to another?</p>
  
  <p>I am aware of has_many &amp; belongs_to, but I wan't sure if I needed to specify user_id when creating the model ...</p>
  
  <pre><code>rails g model User name:string email:string
  </code></pre>
  
  <p><code>rails g model Card inputA:string inputB:string</code> -- do I add <code>user_id:integer</code> ? </p>
  
  <p>and then add <code>has_many :cards</code>, and <code>belongs_to :user</code> ?</p>
  
  <p>or does rails automatically do this when you sue <code>has_many</code> and <code>belongs_to</code></p>