Wes Gamble
2006-Jul-03 18:21 UTC
[Rails] Routing acting strangely - mixed case controller names fail?
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 -- Posted via http://www.ruby-forum.com/.
Wes Gamble
2006-Jul-03 18:25 UTC
[Rails] Re: Routing acting strangely - mixed case controller names f
Wes Gamble 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, > WesI 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 -- Posted via http://www.ruby-forum.com/.
Mark Van Holstyn
2006-Jul-03 18:28 UTC
[Rails] Routing acting strangely - mixed case controller names fail?
it should be list_management. You should use the link_to helper everywhere you generate links to avoid problems like this. mark On 7/3/06, Wes Gamble <weyus@att.net> 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 > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Mark Van Holstyn mvette13@gmail.com http://lotswholetime.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060703/5100ceef/attachment-0001.html
Possibly Parallel Threads
- Paginate - does it requires a specialized route?
- Routing fails for files under public without file extensions
- 1.1.4: link_to with mixed case controller names "broken"?
- Wrap error_messages_for() call when no instance var present
- Implementing HTTPS with WEBrick?