Fixed: for rails4 version