I have setup my routes into namespaces, so it look like
root to: "home#index"
namespace :users do
root to: "profile#index"
resources :registrations
resources :sessions
end
namespace :admin do
root to: "base#index"
end
rake routes |grep root
root / home#index
admin_root /admin(.:format) admin/base#index
users_root /users(.:format) users/profile#index
In my header navigation, I have = link_to "home", root_path
Everything work great in development mode, but completely broken in production
I'm getting No route matches {:controller=>"users/home"}
when trying to access sessions/registrations controller (users/sessions/new)
the root_path in my header try to get home
controller in users
namespace
thanks in advance
Distinguish the root path for each , and try it like
use path like : home_root_path, users_root_path, admin_root_path