Is my problem the formatting of the appointment_time field in the
appointments params? Or is the value that is planned for insert
constrained by a single string input such as "7" rather than "test" =>
"7"?
I tried to remove the "test" => segment to just leave the index, or even
better retrieve the value. I don't see any spelling errors, but I do
know the insert is not typical of String values.
Is my problem the formatting of the appointment_time field in the
appointments params? Or is the value that is planned for insert
constrained by a single string input such as "7" rather than "test" =>
"7"?
I tried to remove the "test" => segment to just leave the index, or even
better retrieve the value. I don't see any spelling errors, but I do
know the insert is not typical of String values.
I think he's trying to point out to you that the appointment_time field is not inside the appointment hash. So when that hash is used to update the @appointment instance, that value will not be added to it. It comes back around to how your form element was made. If you used the "bound" form helpers, as in f.text_field(:appointment_time) to make it, then the name attribute in the HTML would be <input name="appointment[appointment_time]" ...> and the value of that variable would be in the appointment hash.
is not inside the appointment hash. So when that hash is used to update
the @appointment instance, that value will not be added to it. It comes
back around to how your form element was made. If you used the "bound"
form helpers, as in f.text_field(:appointment_time) to make it, then the
name attribute in the HTML would be <input
name="appointment[appointment_time]" ...> and the value of that variable
would be in the appointment hash.
Walter
I do understand this. I tried to input f.select or form.select for this
array drop down but I recieved an error for both so I left select alone
and then it displayed. So I was thinking of encapsulating my array drop
down into a bigger form element. I have f.label on the line above but
the array select would not run with the f.
I do understand this. I tried to input f.select or form.select for this
array drop down but I recieved an error for both so I left select alone
and then it displayed.
"displayed", great, but it doesn't work. Not a good tradeoff
What was the error? What did you find when you googled that error?
How did your code compare to the documentation for that method?
I found other examples undefined method 'merge' but did not find a
solution although I found direction to create my array and array
handling method in the controller. I tried different ways to display
the array dropdown and the code above (without the f.) was the first
time I was able to see the array in dropdown form. It felt like a
relief.