mitre-cyber-academy / ctf-scoreboard-archive

Repository for the Deprecated MITRE Capture the Flag scoreboard.
Apache License 2.0
11 stars 10 forks source link

NoMethodError in Users#show #2

Closed Bialogs closed 9 years ago

Bialogs commented 9 years ago

When signed in as n00bs and click on the team name the following error occurs when viewing own profile and other team profile:

ctf-scoreboard/app/views/users/show.html.haml undefined method `[]' for nil:NilClass

The line highlighted;

If you need help please connect to our IRC channel at #{@game.irc}

Are there any "users" created in the test db? Does not happen when logged in as the other team and view n00b profile, but it does happen when viewing own profile.

rbclark commented 9 years ago

The issue was involving the game.irc not being set by default. In old versions of rails I guess checking if @game.irc was equal to an empty string was sufficient but that is no longer the case.