drewolson/elovation — pull request #36 by kemper (2013-02-04 18:56:33+00:00)
Title: Add Decimal Support to rating

Keeps logic for elo games the same by coercing the value of rating to an
integer. Both values are actually stored as BigDecimal in the database.

Phillip thought that a coercion step was crazier than doing something like creating a helper to wrap the value in the view code.

I don't think that would cover all cases though; For instance, the json services would still report elo values as decimals. My thought is that each games result type determines the class of the value and that that's what we want the rest of the code to use. In the case of elo, that's an integer value. In the case of trueskill, that's a decimal value. So, I redefine the value method for the rating and rating history event to coerce to the correct type. After that, the rest of the codebase (services and view) correctly reports elo ratings and correctly reports trueskill ratings.

I wasn't sure whether you wanted a pull request with migrations collapsed; I assumed not.