fix update rails3 to rails4