Hello, I do have one more question.
After reviewing my development log and creating several appointments, I
see that I am making a successful POST from the form with the
appointment_time containing an index and value.
However, when the SQL insert statement is executed, the appointment_time
param disappears. I have created the field as a String, the select box
is an array dropdown.
I have ferociously reviewed the Appointment controller, test controller,
and adjusted all files in the view to reflect the correct field name. I
check usages of the other ids and matched locations and I still cannot
get my value to display on the show or index page.
This code is in my controller for both create and update methods:
@appointment =
Appointment.new(params[:appointment].permit(:physician_id, :patient_id,
:reason, :appointment_date, :appointment_time, :diagnostic_code_id,
:notes, :appt_completion))
This was retrieved from my log (appointment_time is my focus)
Processing by AppointmentsController#create as HTML
Parameters: {"utf8"=>"✓",
"authenticity_token"=>"3aeYhNBVYaFdHpPHWR5qpoD3QDB8PRUJIiR94WC1kag=",
"appointment"=>{"physician_id"=>"4", "patient_id"=>"8",
"reason"=>"fdsdfs", "appointment_date(1i)"=>"2014",
"appointment_date(2i)"=>"12", "appointment_date(3i)"=>"3",
"diagnostic_code_id"=>"1", "notes"=>"sdfsdfs",
"appt_completion"=>"true"}, "appointment_time"=>{"test"=>"7"},
"commit"=>"Create Appointment"}
[1m[35m (0.0ms)[0m begin transaction
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "appointments"
("appointment_date", "appt_completion", "created_at",
"diagnostic_code_id", "notes", "patient_id", "physician_id", "reason",
"updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m
[["appointment_date", "2014-12-03"], ["appt_completion", "t"],
["created_at", "2014-12-03 00:04:58.420420"], ["diagnostic_code_id",
1.0], ["notes", "sdfsdfs"], ["patient_id", 8], ["physician_id", 4],
["reason", "fdsdfs"], ["updated_at", "2014-12-03 00:04:58.420420"]]
I have been tabbing stack overflow, if you have a resource then please
link it, thanks.