They can. `teams` is the association between User and Team, so it returns all teams that the current user is a part of. That's pretty much exactly the same as your first and 3rd line, and then `where(course: course)` is the same as your second line. So your code is exactly right, it can just be written in a simpler way using the ActiveRecord relationship.