Erik_P
July 25, 2006, 6:17pm
#1
I’m not getting any love grouping controllers into separate namespaces
and I’m hoping someone can tell me what I’m not getting:
$ rails foo
$ cd foo
$ script/generate controller Namespace::Bar index
$ script/server
$ lynx http://localhost:3000/namespace/bar
-> 404
-> Routing Error
-> Recognition failed for “/namespace/bar”
Many thanks in advance.
Erik_P
July 26, 2006, 9:05am
#2
Hello Erik,
-> 404
-> Routing Error
-> Recognition failed for “/namespace/bar”
Can you show us what does your config/routes.rb look
like ?
– Jean-François.
Erik_P
July 28, 2006, 1:26am
#3
Jean-François wrote:
Hello Erik,
-> 404
-> Routing Error
-> Recognition failed for “/namespace/bar”
Can you show us what does your config/routes.rb look
like ?
– Jean-François.
It’s stock as generated in the example. I have changed my routes.rb to
specify the namespace and that works, I just thought it was free. I
added this above the default route:
map.connect ‘namespace/bar/:action/:id’ :controller => ‘namespace/bar’
and it works. Thanks.
Erik_P
August 3, 2006, 2:24pm
#4
Can you show us what does your config/routes.rb look
like ?
That would definitely help, but I had something similar so you can give
this
a try.
In config/routes.rb:
map.connect ‘:controller/:action’
map.connect ‘:controller/:action/:id’