1
有没有一种方法我可以路由 - http://localhost:3000/pages/1到http://localhost:3000/home和我的网站中的所有其他页面,即 - http://localhost:3000/pages/4到http://localhost:3000/contact-us自动?路由到页面名称
我可以做这周围的其他方法使用 -
match "/home" => 'pages#show', :id => 1
match "/cars-for-sale" => 'pages#show', :id => 1
match "/contact-us" => 'pages#show', :id => 4
但需要在翻领和自动如有可能做到这一点。