假设我有一个名为HomeController
的控制器,我不打算将它用作RESTful资源,如何以批量方式定义到该控制器的路由?例如:
controller :home do
collection do
get :dashboard
end
end
答案 0 :(得分:0)
resources :home, only: [] do
collection do
get 'dashboard'
get 'another_dashboard'
end
end