title: Rails has_many_through migration
body: <p>I'm creating a many_to_many association for the following models:</p>
  
  <pre><code>class Competence &lt; ActiveRecord::Base
      has_many :behaviour, through: :behaviours_rel
      has_many :stabilizer, through: :stabilizers_rel
  end
  
  class Behaviour &lt; ActiveRecord::Base
      belongs_to :competence
  end
  
  class Stabilizer &lt; ActiveRecord::Base
      belongs_to :competence
  end
  </code></pre>
  
  <p>I believe I have to do something like:</p>
  
  <pre><code>rails generate migration behaviour:belongs_to 
  </code></pre>
  
  <p>but it doesn't work. I simply can't get the logic of doing this migration with rails generate.</p>
  
  <p>I'm trying to save in a competence several behaviours so a one_to_many relationship is not enough.</p>
  
  <p>By the way, I don't want to do it explicitly with sql table.</p>