# Controller Problem

**URL:** <https://www.ruby-forum.com/t/controller-problem/178785>\
**Category:** Rails\
**Created:** [November 11, 2009, 10:17am UTC](https://www.ruby-forum.com/t/controller-problem/178785 "2009-11-11T10:17:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinay](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/6a8cbe/32.png) [@vinay](https://www.ruby-forum.com/u/vinay)\
**Post date:** [November 11, 2009, 10:17am UTC](https://www.ruby-forum.com/t/controller-problem/178785/1 "2009-11-11T10:17:51Z")

</div>

Hi,  
I am new to this ruby on rails talk. and also fairly new to rails. As  
i was working on controller i had faced a new problem. I created a  
controller like  
script/server generate controller Home::hello index  
and one more controller like  
script/server generate controller Home hello  
and their respective view pages  
my question is when i type the url like [http://localhost/home/hello](http://localhost/home/hello)  
why is the action inside the first controller is always called and if  
i want to call the action of my second controller what do i need to  
type in the url

Thanks in Advance  
Vinay

---

<div class="post-metadata">

**Author:** ![vinay](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/6a8cbe/32.png) [@vinay](https://www.ruby-forum.com/u/vinay)\
**Post date:** [November 11, 2009, 10:24am UTC](https://www.ruby-forum.com/t/controller-problem/178785/2 "2009-11-11T10:24:18Z")

</div>

On Nov 11, 5:02 am, Vinay [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> i want to call the action of my second controller what do i need to  
> type in the url

Well you’ve created an ambiguous set of urls there. Reordering the  
corresponding declarations in routes.rb might make rails pick one over  
the other, but really I’d recommend you come up with names that don’t  
result in ambiguous urls.

Fred
