# Routing acting strangely - mixed case controller names fail?

**URL:** <https://www.ruby-forum.com/t/routing-acting-strangely-mixed-case-controller-names-fail/96964>\
**Category:** Rails\
**Created:** [July 3, 2006, 8:20pm UTC](https://www.ruby-forum.com/t/routing-acting-strangely-mixed-case-controller-names-fail/96964 "2006-07-03T20:20:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [July 3, 2006, 8:20pm UTC](https://www.ruby-forum.com/t/routing-acting-strangely-mixed-case-controller-names-fail/96964/1 "2006-07-03T20:20:59Z")

</div>

All,

I have a link that used to work but now generates a routing error. The  
link URL is a straightforward controller/action/id and of course, I have

map.connect ‘:controller/:action/:id’

in my routes.rb file.

When I click on this link, I get a routing error. What’s potentially  
interesting about this URL is that the controller name is mixed case.  
Class is ListManagementController, file name is list\_management, and my  
URL is:

/listManagement/target\_lists\_delete/6

Am I specifying the link name incorrectly? Is it possible that  
specifying the mixed case controller name in a URL used to work but now  
cannot be resolved correctly?

Should it be list\_management or ListManagement?

I am pretty confident that this used to work and then stopped and I’ve  
upgraded to Rails 1.1.13 and 1.1.14 since it worked.

Thanks,  
Wes

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [July 3, 2006, 8:24pm UTC](https://www.ruby-forum.com/t/routing-acting-strangely-mixed-case-controller-names-fail/96964/2 "2006-07-03T20:24:53Z")

</div>

Wes G. wrote:

> All,
> 
> I have a link that used to work but now generates a routing error. The  
> link URL is a straightforward controller/action/id and of course, I have
> 
> map.connect ‘:controller/:action/:id’
> 
> in my routes.rb file.
> 
> When I click on this link, I get a routing error. What’s potentially  
> interesting about this URL is that the controller name is mixed case.  
> Class is ListManagementController, file name is list\_management, and my  
> URL is:
> 
> /listManagement/target\_lists\_delete/6
> 
> Am I specifying the link name incorrectly? Is it possible that  
> specifying the mixed case controller name in a URL used to work but now  
> cannot be resolved correctly?
> 
> Should it be list\_management or ListManagement?
> 
> I am pretty confident that this used to work and then stopped and I’ve  
> upgraded to Rails 1.1.13 and 1.1.14 since it worked.
> 
> Thanks,  
> Wes

I verified that using the _file_ name of the controller works. But I am  
certain that this changed. Interestingly enough, in the routes.rb file,  
I can route to a mixed case controller name with the :controller  
parameter.

True, I’m not using url\_for to generate this URL - it is hard-coded in  
Javascript. Is that my problem?

Wes

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [July 3, 2006, 8:30pm UTC](https://www.ruby-forum.com/t/routing-acting-strangely-mixed-case-controller-names-fail/96964/3 "2006-07-03T20:30:11Z")

</div>

it should be list\_management. You should use the link\_to helper  
everywhere  
you generate links to avoid problems like this.

mark
