Prevent foreign_key_for? from type casting all attributes
Merge pull request #14140 from WojtekKruszewski/optimize_foreign_key_for

Prevent foreign_key_for? from evaluating all attributes