This one can be refactored by defining a students relation at the top:

```rb
has_many :students, :through => :student_assignments
```

or something like that. Then just call students directly.