Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

1.8.7 Hashes, Y U NO ORDERED?

  • Loading branch information...
commit ddc8e2f0039f7a6b63aadd723c26256ed35dd84a 1 parent ffc5e96
@semanticart semanticart authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/helpers/players_helper.rb
View
6 app/helpers/players_helper.rb
@@ -67,12 +67,12 @@ def player_total_stats player
end
def player_season_stats player
- columns = {}
+ columns = ActiveSupport::OrderedHash.new
player.seasons.order("year ASC").each do |season|
- season.attributes.slice(*PLAYER_SEASON_STAT_ATTRIBUTES).each do |column, value|
+ PLAYER_SEASON_STAT_ATTRIBUTES.each do |column|
columns[column] ||= []
- columns[column] << value
+ columns[column] << season.attributes[column]
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.