tsailipu
2006-Jul-12 21:09 UTC
[Rails] routing: controllers ''user'' and ''user/blogs'' not possible?
Hi, I have been searching for discussions on this issue to see whether this is a bug or feature in Rails'' routing mechanism. Say I have a UserController corresponding to URL pattern /user, and now I want to have a separate controller under user called blogs, using the controller module feature, User::BlogsController, corresponding to URL pattern /user/blogs. Such design looks intuitive but it looks like in Rails 1.1.4, this is still not possible. In routes.rb, this would look like map.connect ''user/blogs'', :controller => ''user/blogs'' map.connect ''user'', :controller => ''user'' Typing http://localhost:3000/user/blogs results in look-up for ''blogs'' controller instead. Has anyone looked into this before and known whether this behavior is a bug or limitation? Thanks, Philip -- Posted via http://www.ruby-forum.com/.
tsailipu
2006-Jul-12 22:22 UTC
[Rails] Re: routing: controllers ''user'' and ''user/blogs'' not possibl
From some controller module discussions, it looks like this issue may also be related to the problem of having a model called User while using a controller module User with BlogsController under it (?). Getting nice.... -- Posted via http://www.ruby-forum.com/.