Undefined method error

This is a shot in the dark since I'm really struggling in
understanding how your tables work together, but instead of,
    "task.task_users.collect{|task_user|
task_user.court_user.user.name}"
how about,
    "task.task_users.collect{|task_user|
task_user.court_users.user.name}"
or this,
    "task.task_users.collect{|task_user|task_user.users.name}"