title: Missing Attribute Error
body: <p>I'm working with Rails, and when setting up some tests I encountered: </p>
  
  <pre><code>ActiveModel::MissingAttributeError:
  can't write unknown attribute `group_id`
  </code></pre>
  
  <p>I'm guessing the issue is in my relations. I have </p>
  
  <pre><code>class Group &lt; ActiveRecord::Base
      has_many :transactions
      has_many :users
  end
  </code></pre>
  
  <p>And</p>
  
  <pre><code>class Transaction &lt; ActiveRecord::Base
      belongs_to :group 
      belongs_to :user
  end
  </code></pre>
  
  <p>And lastly, </p>
  
  <pre><code>class User &lt; ActiveRecord::Base
      belongs_to :group
      has_many :transactions
  end
  </code></pre>
  
  <p>I saw that someone had the same error because they were using <code>has_one</code> rather than <code>belongs_to</code> and needed to add an ID column to their DB.  I'm using <code>belongs_to</code> though, so I don't think that's what I need? Any ideas?</p>