redding/mr — pull request #132 by jcredding (2013-11-20 18:12:03+00:00)
Title: Fix read model type casting, use AR column

This syncs up the read model fields type casting logic to use the
same logic as ActiveRecord. This fixes issues when comparing read
model data to a model's data. There were issues with values not
being casted as the same objects and a bug with date time's
dropping time zone information. This ensures that read model data
will be like getting the data straight from model.

Unfortunately, ActiveRecord doesn't make this easy. This uses
"internals" of ActiveRecord, by looking up the column class for
the data and then using that to type cast it. If the data is a
non-ActiveRecord, the base `Column` class is used. This matches
how ActiveRecord's logic works. To work with this, there are
system tests that compare the result of each column type. These
ensure that the read model is returning column values like
ActiveRecord does.