I have two models:Task and Context
Task belongs_to Context
Context has_many Tasks
In my form partial for editing a task, I want to have a drop down with
all
of the contexts where you can select one for the task.
I tried:
Contexts:<%= collection_select(“task”, “context” , @contexts,
“id”,
“fullName”, {}) %>
which doesn’t work for setting with the current value.
Any suggestions?
Thanks in advance,
Alan