Skip to content

Commit

Permalink
Merge pull request #2 from lawlesst/patch-1
Browse files Browse the repository at this point in the history
Convert to integers for calculations.
  • Loading branch information
jrochkind committed Feb 19, 2014
2 parents a585c24 + 0c226c0 commit 00c4f31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/report_controller.rb
Expand Up @@ -21,7 +21,7 @@ def victory_rate(row)
if row["wins"].to_i == 0 if row["wins"].to_i == 0
0 0
else else
100 * row["wins"].to_f / ( row["wins"] + row["losses"] ) 100 * row["wins"].to_f / ( row["wins"].to_i + row["losses"].to_i )
end end
end end
helper_method :victory_rate helper_method :victory_rate
Expand Down

0 comments on commit 00c4f31

Please sign in to comment.