title: models and belongs_to block in controllers#create
body: <p>I have been struggling with my controllers#create method for some time and remembered that I have 'belongs_to' in my product.rb, I believe the block is in some kind of validation 'belongs_to' performs when requiring @category to exist, which it does.  Somehow I am validating @product wrong. Could someone steer me in the right direction to fix this?  I can post whatever is necesssary, basically I have category belongs to user product belongs_to category, so it blocks my products#create for some reason.  Here are error messages:</p>
  
  <pre><code>ActiveRecord::NotNullViolation (Mysql2::Error: Field 'category_id' doesn't have a default value: INSERT INTO `products` (`name`, `created_at`, `updated_at`) VALUES ('btw', '2018-08-02 13:26:36', '2018-08-02 13:26:36')):
  </code></pre>
  
  <p>OMG!  THIS TOOK FOREVER.  All I had to do was add primary_key: true.  Wooo!  Thanks guys, really.</p>