嗨,我想将我的rails应用程序的根路径重定向到特定名称空间内存在的控制器。这可能吗?
代码:
root to: 'production/static_pages#index'
我想将根路径重定向到生产名称空间中的static_pages控制器。
我试过了:
namespace :production do
root to: 'production/static_pages#index'
end
但这仅将生产名称空间中的根路径定向到该适当的控制器。
实际上,我的代码有效。
root to: 'production/static_pages#index'
正是如何将根路径连接到生产名称空间内的static_pages控制器。对困惑感到抱歉!OO
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句