这是我当前的 routes.rb 代码:
Mysite::Application.routes.draw do
get "pages/home"
get "pages/about"
get "pages/resume"
get "pages/contact"
root :to => "pages#home"
match "/about", to: "pages#about"
match "/resume", to: "pages#resume"
match "/contact", to: "pages#contact"
end
有没有办法简化根目录到页面控制器的路由?我可以将整个根目录与页面控制器本身匹配,而不是将根目录的每个路由都匹配到页面控制器操作吗?