fix routing on rails4, add test