Routes problem

I want to connect default route to controller Report::SalesController,
so I have line:
map.connect '', :controller => 'report/sales'
in config/routes.rb

SalesController is in app/controllers/report/sales.rb
and is declared as:
class Report::SalesController < ApplicationController

The problem is that when I try to open root url of my application I
get error message:
uninitialized constant SalesController

What I'm doing wrong?

if you have this route:

map.connect '', :controller => 'report/sales'

your controller would have to be named like this (as far as i know):

class SalesController < ApplicationController

The problem is that file with your controller should be named
sales_controller.rb (like class name, but underscored). Rails classes are
loaded on demand and without proper naming Rails will not find which file to

So how can I write a route that redirects to Report::SalesController?

Sorry, I mistyped controller file name, it is actually:

So it seems that rails can't guess controller class if it's inside of module.
I created this controller using:
ruby script/generate controller report/sales

So it seems to be supported. And I can activate the controller by going to:

So the problem is only with routing.

Try this:

map.connect '', :controller => '/report/sales