title: Has_many, Through: Saving Joiner Table Fail
body: <p>So I have three classes:</p>
  
  <pre><code>class Physician &lt; ActiveRecord::Base
    has_many :appointments
    has_many :patients, through: :appointments
  end
  
  class Appointment &lt; ActiveRecord::Base
    belongs_to :physician
    belongs_to :patient
  end
  
  class Patient &lt; ActiveRecord::Base
    has_many :appointments
    has_many :physicians, through: :appointments
  end
  </code></pre>
  
  <p>I am trying to create a new Patient record through an existing Physician record.</p>
  
  <pre><code>doctor = Physician.first  
  sick_person = doctor.patients.new 
  sick_person.save
  </code></pre>
  
  <p>What is happening is that the patient record gets saved but the joiner record, appointments, doesn't get created. I have been reading a few forums and they suggested I use an inverse_of (<a href="https://github.com/rails/rails/issues/6161#issuecomment-6330795" rel="nofollow">https://github.com/rails/rails/issues/6161#issuecomment-6330795</a>, which seems not right when using a :through. </p>
  
  <p>Any body have any ideas of how to get the joiner table recorded? I know I could also create the patient record first and then create the appointments record afterwards with that patient id, but I'm wondering if there is more of an eloquent solution. </p>