add support for activerecord 4