Hello,
Currently, my issue is that I cannot see the values I have selected in my Appointment form. This is the code in my appointments/form.html.erb.
<div class="field"> <%= f.label :appointment_time %><br>
<%= select "obj", "test", timeslots.map.with_index{ |name, index| [name, index] } %> </div>
<div class="field"> <%= f.label :diagnostic_code %><br> <%= f.collection_select :diagnostic_code_id, DiagnosticCode.all, :id, :diagnostic_code_id %> </div>
<div class="field"> <%= f.label :appt_completion %><br> <%= radio_button_tag(:appt_completion, "yes") %> <%= label_tag(:appt_completion_yes, "Appointment Completed") %> <%= radio_button_tag(:appt_completion, "no") %> <%= label_tag(:appt_completion_no, "Appointment Not Completed") %> </div>
I have this in the appointments/show.html.erb:
<p> <strong>Appointment Time:</strong> <%= @appointment.appointment_time %> </p>
<p> <strong>Diagnostic Code:</strong> <%= @appointment.diagnostic_code_id %> </p>
<p> <strong>Appointment Completion Status:</strong> <%= @appointment.appt_completion %> </p>
I think my problem may have resulted from the manner I added and modified columns using multiple migrations to the Appointment table. Attached is my current design. My design is not concrete, I am looking for suggestions and guidance so I really appreciate any assistance.
My main goal though is to get this show operation working.
Attachments: http://www.ruby-forum.com/attachment/10306/appt_index.jpg http://www.ruby-forum.com/attachment/10307/appt_form.jpg