active record 4 compatibility