Instead of calling `try` here, you should change the conditional to check if the student has a team for course (otherwise, you're going to generate an empty link). Try should only be used when the object not being present is a valid outcome.

If it's too wordy to call `student.team_for_course(current_course)` multiple times, you can assign it to a local variable:

```ruby
- if team = student.team_for_course(current_course)
  = link_to team.name, team