allow support for activerecord 4