Shopify/identity_cache — pull request #185 by dylanahsmith (2014-12-03 23:07:12+00:00)
Title: Use type_cast method on connection adapter for rails 4.2 compatibility.

@arthurnn & @fbogsany for review

## Problem

Yesterday I found out that ar_transaction_changes doesn't work with the rails 4.2 release candidate, so fixed that and made a release. I tested the changes with IDC, since it uses ar_transaction_changes and found out we are calling a removed/renamed method (Column#type_cast). There are now variants of that, including type_cast_for_database and type_cast_for_user, type_cast_from_database and type_cast_for_schema.

## Solution

Use the type_cast method on the connection, since that has been around long enough to work with the versions we already support. Internally it uses type_cast_for_database in rails 4.2, which is what we want.

There are other test failures with rails 4.2, so I didn't add it to travis CI yet.