Skip to content
Browse files

Merge pull request #2 from lawlesst/patch-1

Convert to integers for calculations.
  • Loading branch information...
2 parents a585c24 + 0c226c0 commit 00c4f31bf2758185aec6d911603bb7ca7dc46fcd @jrochkind committed Feb 19, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/report_controller.rb
View
2 app/controllers/report_controller.rb
@@ -21,7 +21,7 @@ def victory_rate(row)
if row["wins"].to_i == 0
0
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
helper_method :victory_rate

0 comments on commit 00c4f31

Please sign in to comment.
Something went wrong with that request. Please try again.