title: Rails: Has_many through query depending on the through table attribute
body: <p>Having some problems with a has_many through query.</p>
  
  <p>Using the example here: <a href="http://guides.rubyonrails.org/association_basics.html#the-has_many-through-association" rel="noreferrer">http://guides.rubyonrails.org/association_basics.html#the-has_many-through-association</a></p>
  
  <pre><code>class Physician &lt; ActiveRecord::Base
    has_many :appointments
    has_many :patients, :through =&gt; :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 =&gt; :appointments
  end
  </code></pre>
  
  <p>The Appointment table has a column named <strong>appointment_date</strong></p>
  
  <p>How would I get all the Patients from a Specific Physician that have an appointment on a given date?</p>