perfectline/validates_existence — pull request #21 by lucas-clemente (2013-04-26 11:21:12+00:00)
Title: Use foreign_key for ActiveRecord 4.0.0

The previous fix didn't work for 4.0.0, since it always checked the minor version.