rails4 compatibility