allow for activerecord 4