On 13 December 2012 14:23, Lorenz Blackbird <[email protected]> wrote: > Hello, > > I have a many-to-many relationship between the model "exams" and the > model "students", in the middle I have the model "registrations". > > Students are registered to a "course" (another model) and any exam is > associated to a "course". > > I create a view in exams that permit to add the students with multiple > selection: > > <%= f.select :student_ids, Student.all.map { |student| [student.name, > student.id] }, { }, { multiple: true } > > but this solution show me all students in the db. I wish I had only the > students registered in the same course of exam.
What do you mean by "the same course of exam". Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

