title: has_many :through NameError: uninitialized constant
body: <p>I just want to make a little join table, eventually storing extra info on that join (which is why I'm not using HABTM). From the rails documentation of associations I've created the following models:</p>
  
  <pre><code>class Physician &lt; ActiveRecord::Base
    has_many :appointments
    has_many :patients, :through =&gt; :appointments
  end
  
  class Patient &lt; ActiveRecord::Base
    has_many :appointments
    has_many :physicians, :through =&gt; :appointments
  end
  
  class Appointment &lt; ActiveRecord::Base
    belongs_to :physicians
    belongs_to :patients
  end
  </code></pre>
  
  <p>my schema looks like this:</p>
  
  <pre><code>ActiveRecord::Schema.define(:version =&gt; 20130115211859) do
  
    create_table "appointments", :force =&gt; true do |t|
      t.datetime "date"
      t.datetime "created_at",   :null =&gt; false
      t.datetime "updated_at",   :null =&gt; false
      t.integer  "patient_id"
      t.integer  "physician_id"
    end
  
    create_table "patients", :force =&gt; true do |t|
      t.string   "name"
      t.datetime "created_at", :null =&gt; false
      t.datetime "updated_at", :null =&gt; false
    end
  
    create_table "physicians", :force =&gt; true do |t|
      t.string   "name"
      t.datetime "created_at", :null =&gt; false
      t.datetime "updated_at", :null =&gt; false
    end
  
  end
  </code></pre>
  
  <p>When I'm in the console and I create a physician and patient instance:</p>
  
  <pre><code>@patient = Patient.create!
  @physician = Physician.create!
  </code></pre>
  
  <p>And try to associate one to the other</p>
  
  <pre><code>@physician.patients &lt;&lt; @patient
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>NameError: uninitialized constant Physician::Patients
  </code></pre>
  
  <p>Questions about this example have been asked before but none have address my scenario. Any ideas?</p>
  
  <p>Thanks, 
  Neil, rails newbie. </p>