fix subdomain routes for rails4