I'm currently doing all of this just to have a drop-down list of Courses for a particular student:
===== edit template ===== <%= f.select :course, @courses, :selected => @student.course.id %>
I'm currently doing all of this just to have a drop-down list of Courses for a particular student:
===== edit template ===== <%= f.select :course, @courses, :selected => @student.course.id %>
How about:
===== edit template ===== <%= f.select :course_id, @courses %>
When I get that, I get an exception: Course expected, but got String
Oops.. forgot to mark attr_accessible :course_id. Doing what you
suggested works as expected. I tried a lot of different combinations
to get what I wanted, I just must have missed this one. Thanks!