Added support for activerecord 4.1