rails/rails — pull request #15482 by laurocaetano (2014-06-03 02:15:04+00:00)
Title: Fix regression on eager loading association based on SQL query rather than existing column.

It is a regression added by #14855 (yeah, that's my fault :angry:)

Basically it checks if the column exists before trying to get its type.

Fixes #15480.