title: Rails has_and_belongs_to_many migration
body: <p>I have two models <code>restaurant</code> and <code>user</code> that I want to perform a has_and_belongs_to_many relationship.</p>
  
  <p>I have already gone into the model files and added the <code>has_and_belongs_to_many :restaurants</code> and <code>has_and_belongs_to_many :users</code></p>
  
  <p>I assume at this point I should be able to do something like with Rails 3:</p>
  
  <pre><code>rails generate migration ....
  </code></pre>
  
  <p>but everything I have tried seems to fail. I'm sure this is something really simple I'm new to rails so I'm still learning.</p>