Ruby on rails Rails:根路径重定向

Ruby on rails Rails:根路径重定向,ruby-on-rails,Ruby On Rails,嗨,我想重定向到rails应用程序的根路径,指向存在于特定命名空间中的控制器。这可能吗 代码: root to: 'production/static_pages#index' 我希望根路径重定向到生产命名空间内的静态页面控制器 我试过: namespace :production do root to: 'production/static_pages#index' end 但这只会将生产命名空间中的根路径指向相应的控制器 实际上,我的代码是有效的

嗨,我想重定向到rails应用程序的根路径,指向存在于特定命名空间中的控制器。这可能吗

代码:

    root to: 'production/static_pages#index'
我希望根路径重定向到生产命名空间内的静态页面控制器

我试过:

    namespace :production do
      root to: 'production/static_pages#index'
    end   

但这只会将生产命名空间中的根路径指向相应的控制器

实际上,我的代码是有效的

root to: 'production/static_pages#index'
就是如何将根路径连接到生产命名空间内的静态页面控制器。 抱歉搞混了!o、 o