I want to have to url /pc/group/1 point to views/groups/show.html.erb. I'm not sure how to do this. I tried the following:
namespace :pc do
resources :groups
end
resources :pc
But it results in can't find the page.
You'd tell the route which controller and action to use in this situation:
namespace :pc, controller: 'groups' do
resources :groups
end
resources :pc
Note that doing it this way, all routes for /pc/groups will point to the GroupsController, not just show.
Pc::Groups#show, not Groups#show.Pg::GroupsController but you only have a GroupsController - the Pg in the former is the namespace in your routes. Have you tried my change?
rake routesin your terminal. The real route for this routes.rb should be /pc/groups/1