title: has_many :through causes error: HasManyThroughSourceAssociationMacroError
body: <p>I need to assign students (users) to classes (studentclasses)</p>
  
  <p>I have a simple many-to-many relationship using 3 tables:</p>
  
  <p><strong>studentclasses</strong> (lesson details)</p>
  
  <p><strong>users</strong>  (user... student info) </p>
  
  <p><strong>studentclass_users</strong> (Join table containing <strong>user_id</strong> and <strong>studentclass_id</strong>)</p>
  
  <p>I'm using has_many :through and my models look like the following:</p>
  
  <p><strong>studentclass.rb</strong></p>
  
  <pre><code>class Studentclass &lt; ActiveRecord::Base
    has_many :studentclass_users
    has_many :users, :through =&gt; :studentclass_users
  end
  </code></pre>
  
  <p><strong>user.rb</strong></p>
  
  <pre><code>class User &lt; ActiveRecord::Base
  
      ...more here...
  
      has_many :studentclass_users
      has_many :studentclasses, :through =&gt; :studentclass_users
  end
  </code></pre>
  
  <p><strong>studentclass_users.rb</strong></p>
  
  <pre><code>class StudentclassUsers &lt; ActiveRecord::Base
    belongs_to :studentclass
    belongs_to :user
  end
  </code></pre>
  
  <p>For testing purposes, I'm just using a hidden field in my studentclass new view partial to tack on a user id when creating the class and it is as follows:</p>
  
  <p><strong>_new.html.erb</strong></p>
  
  <pre><code>&lt;%= hidden_field_tag "studentclass[user_ids][]", 29%&gt;
  </code></pre>
  
  <p>And in my studentclass controller:</p>
  
  <p><strong>studentclasses_controller.rb</strong></p>
  
  <pre><code>def new
    @studentclass = Studentclass.new
  end 
  
  def create
    @studentclass = Studentclass.new(params[:studentclass])
    @studentclass.save!
  end
  </code></pre>
  
  <p>My params comes back:</p>
  
  <blockquote>
    <p>Parameters: {"utf8"=>"✓", "authenticity_token"=>"MjBTf4rtcyo8inADrSxPZB3vLOKtlZRVFlQJJzfCqWs=", "studentclass"=>{"class_title"=>"hjhkj", "user_ids"=>["29"]}, "commit"=>"Save"}</p>
  </blockquote>
  
  <p>which seems fine but I get the following error:</p>
  
  <blockquote>
    <p>NameError (uninitialized constant ActiveRecord::HasManyThroughSourceAssociationMacroError):</p>
  </blockquote>
  
  <p>I think this is something simple with naming maybe?  Any help would be appreciated</p>