routes, controllers, and intentions

I have the following tables: courses, students, and rosters. The
rosters table references the courses and students tables. With
default routes in place, to list the students in a course I would use:
http://localhost:3000/rosters/list

but this lists the rosters for all courses.

if I use http://localhost:3000/rosters/list/1

rails looks in the rosters table for entry with the id =1. How do I
tell it I want all the entries where course_id = 1?