[英]How can I route the root of a Rails app to a specific controller?
現在,我的路徑是“ localhost:3000 / boards”。 因此,例如“ boards / new”,“ boards / 1”等。如何將它們全部路由到root。 所以我可以只執行'localhost:3000 / new','localhost:3000/1'並將其路由到'boards'嗎?
謝謝!
嘗試在config / routes.rb中使用resources :board, path: "/"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.