updated to rails4