title: Using collection_select in Rubymine
body: <p>I have reviewed posts on this board and Google's search results on undefined method <code>merge' and undefined method</code>delete' for the same variable in my project.</p>
  
  <p>I have these relationships implemented in the corresponding models</p>
  
  <pre><code>class Appointment &lt; ActiveRecord::Base
    belongs_to :physician
    belongs_to :patient
    belongs_to :diagnostic_code
  end
  
  class Patient &lt; ActiveRecord::Base
    has_many :appointments
    has_many :physicians, :through =&gt; :appointments
  end
  
  class Physician &lt; ActiveRecord::Base
    has_many :appointments
    has_many :patients, :through =&gt; :appointments
  end
  </code></pre>
  
  <p>Currently, I am trying to implement a collection select that will allow the user to select a physician and patient in the appointment creation process.  The error I am currently receiving is:</p>
  
  <p><strong>undefined method `physician_id' for #</strong></p>
  
  <p>The error is below.  This error is located in my appointments/form and is encountered when my program attempts to render a new form.</p>
  
  <pre><code>    &lt;div class="field"&gt;
        &lt;%= f.label :physician_id %&gt;&lt;br&gt;
        &lt;%= f.collection_select :physician_id, @physicians, :id, :full_name %&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;%= f.label :patient_id %&gt;&lt;br&gt;
       &lt;%= f.collection_select :patient_id, @patients, :id, :full_name2 %&gt;
     &lt;/div&gt;
  </code></pre>
  
  <p>I have scaffolded each of these fields correctly from my understanding and have copied and adjusted the code that has worked for other users experiencing this problem. I have also ran a migration afterwords. </p>