nsturgis/Leaderboard- — pull request #1 by hchood (2014-08-25 17:09:16+00:00)
Title: Indentation & whitespace edits

Hi Nick

Nice work on the systems check. I made some edits in this pull request, which you can see in more detail if you click on the "Files Changed" tab.

Some big-picture comments:

**Methods.** I'd try to refactor all the setup in your `game_time.rb` file into methods, like you did for `find_teams`.

**Use a single data structure.** The way you've created your instance variables splits out the information you'll need in your view into 3 separate data structure (for team names, wins, and losses). This certainly works, but it'd be a bit more robust to have all that information in a single data structure. Otherwise, if one of the data structures somehow got re-ordered, the number of wins displayed for Patriots (for example), might be wrong.

I'd probably use a data structure like this:
```ruby
@team_records = {
"Patriots" => { wins: 3, losses: 0 },
"Broncos" => { wins: 1, losses: 1 },
"Colts" => { wins: 0, losses: 2 },
"Steelers" => { wins: 0, losses: 1 }
}
```

Now in your view you can iterate over @team_records like so:

```erb
<% @team_records.each do |team, record| %>

<%= "#{team}: #{record[:wins]} wins, #{record[:losses]} losses" %>

<% end %>
```

*