adds rails4 compatibility