# Parent controller\_name (nested)

**URL:** <https://www.ruby-forum.com/t/parent-controller-name-nested/192684>\
**Category:** Rails\
**Created:** [August 4, 2010, 1:11am UTC](https://www.ruby-forum.com/t/parent-controller-name-nested/192684 "2010-08-04T01:11:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rodrigo\_MendonSSSSa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@Rodrigo\_MendonSSSSa](https://www.ruby-forum.com/u/Rodrigo_MendonSSSSa)\
**Post date:** [August 4, 2010, 1:11am UTC](https://www.ruby-forum.com/t/parent-controller-name-nested/192684/1 "2010-08-04T01:11:52Z")

</div>

Hi people,  
i have this route in rails

[http://localhost:3002/gdm/9/cd/posts/10/comments](http://localhost:3002/gdm/9/cd/posts/10/comments)

we can see we have a namespace with prefix in gdm/9/cd/

also we have two controllers

i will create a helper, and need get ther controllers name with  
commands

i know i can get “comments” with \<%=controller\_name%\>

But how can i get “posts”

Sorry for my bad english =/

Thx

–  
Rodrigo MendonÃ§a  
(62) 8567-3142
