title: Select category: Rails 4 many to many association
body: <p>Sorry for my English</p>
  
  <p>I have a create many to many association between articles and categories</p>
  
  <p>this is my article model</p>
  
  <pre><code>class Article &lt; ActiveRecord::Base
      has_many :categorizations
      has_many :categories, through: :categorizations
  end
  </code></pre>
  
  <p>this is my category model</p>
  
  <pre><code>class category &lt; ActiveRecord::Base
      has_many :categorizations
      has_many :articles, through: :categorizations
  end
  </code></pre>
  
  <p>in this my categorization model</p>
  
  <pre><code>class Categorizations &lt; ActiveRecord::Base
      belongs_to :article
      belongs_to :category
  end
  </code></pre>
  
  <p>then I have create the categories names in the Seed file</p>
  
  <p>but I try to get the categories in a select but I get this Error</p>
  
  <pre><code>undefined method category_id' for &lt;%= f.collection_select :category_id, Category.all, :id, :name, :include_blank =&gt; true %&gt;
  </code></pre>