This is how a common namespace looks like.
namespace :admin do
resources :posts
end
And it creates a named route like this one;
Just try the code in routes.
namespace :admin, as: '' do
get '/post/new' => 'posts#new', as: 'new_admin_post'
end
If you don't want to make admin namespace as nil, then you can do it. for that you need to put that route out of the namespace :admin block in routes
namespace :admin do
# your other routes
end
get '/admin/post/new' => 'admin/posts#new', :as => 'new_admin_post'