Active record rails 4 compatible