# Subcontroller stopped working

**URL:** <https://www.ruby-forum.com/t/subcontroller-stopped-working/111306>\
**Category:** Rails\
**Created:** [August 5, 2007, 3:47pm UTC](https://www.ruby-forum.com/t/subcontroller-stopped-working/111306 "2007-08-05T15:47:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [August 5, 2007, 3:47pm UTC](https://www.ruby-forum.com/t/subcontroller-stopped-working/111306/1 "2007-08-05T15:47:10Z")

</div>

Two months ago i developed my first little application with Ruby on  
Rails.  
This application uses subcontrollers as in:  
admin/subcontroller/action/id

This works fine in that application.

But i wanted to develop a new application. Now when create a controller  
named admin with different subcontrollers it doesn’t seem to work.  
When i browse to : admin/subcontroller/action it says it cant find the  
action in admin controller.

When i manually add a map.connect line where it states:  
map.connect ‘admin/subcontroller/:action/:id’, :controller =\>  
‘admin/subcontroller’ it works.  
but then i have to add a line for every subcontroller.

I dont get it, did something change in the codebase in the last 2  
months?

---

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [August 5, 2007, 10:54pm UTC](https://www.ruby-forum.com/t/subcontroller-stopped-working/111306/2 "2007-08-05T22:54:50Z")

</div>

I reviewed the code again, and when i don’t create the actual  
admincontroller the subcontrollers work. any suggestion how i can get  
both to work at the same time?
