# Simple routing question

**URL:** <https://www.ruby-forum.com/t/simple-routing-question/89998>\
**Category:** Rails\
**Created:** [March 24, 2007, 8:57pm UTC](https://www.ruby-forum.com/t/simple-routing-question/89998 "2007-03-24T20:57:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bryanmtl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e68b1a/32.png) [@bryanmtl](https://www.ruby-forum.com/u/bryanmtl)\
**Post date:** [March 24, 2007, 8:57pm UTC](https://www.ruby-forum.com/t/simple-routing-question/89998/1 "2007-03-24T20:57:51Z")

</div>

I’m setting up my first real rails app, and I’ve run into the  
following problem.

I have an admin area that now contains many controllers. To keep  
things clean, i’ve grouped my controllers in an “admin” folder.

For example, I have “[应用宝官网-全网最新最热手机应用游戏下载](http://myapp.com/admin/member/)” and  
[应用宝官网-全网最新最热手机应用游戏下载](http://myapp.com/admin/press/)" and [应用宝官网-全网最新最热手机应用游戏下载](http://myapp.com/admin/users/)"

I’ve updated the controllers, accordingly (class  
Admin::MemberController \< ApplicationController for example), and all  
works fine - as long as I remove the admin\_controller.rb file from the  
root of the admin folder. If exists, my app will not look within the  
“member” folder to find the member controller.

I’d like to keep the admin\_controller there so that i can set up a  
default admin page with links to all the sections. Am I missing  
something with routing that could help me out?

Thanks in advance,

bryan

---

<div class="post-metadata">

**Author:** ![bryanmtl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e68b1a/32.png) [@bryanmtl](https://www.ruby-forum.com/u/bryanmtl)\
**Post date:** [March 24, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/simple-routing-question/89998/2 "2007-03-24T23:11:02Z")

</div>

The solution you’re looking for is probably in using routes to get  
what you want, not controller modules.

---

<div class="post-metadata">

**Author:** ![bryanmtl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e68b1a/32.png) [@bryanmtl](https://www.ruby-forum.com/u/bryanmtl)\
**Post date:** [March 25, 2007, 2:43pm UTC](https://www.ruby-forum.com/t/simple-routing-question/89998/3 "2007-03-25T14:43:10Z")

</div>

any idea what kind of route i could set up?

I’d like to have an action reply to /admin/ requests.

def index  
end

for example…

TIA,

Bryan
