Structuring a rails application

I try to structure my rails application with modules, but i have problems to define the routes. Is' it possible to use someting like this: <%= link to '...', :module => :module_name, :controller => :ctrl_name [...] -%> ?

The controllers i want to access are in app/controllers/module_name. I thougt i could define something like this: map.connect ':module/:controller/:action', but it doesn't work.

You could try to namespace them instead of wrapping multiple controllers in a module if that is an option.

script/generate controller admin/messages script/generate controller admin/users

Fredrik

But this has the same effect like "script/generate Admin::Messages" the class that will be created is in the module Admin. This is not a problem for me, but how do i create links to the modules. Is it posible to route requests in a default folder? For example:

controllers/admin controllers/customers controllers/public

are my differnt interfaces, by default the controllers in public should serve the users request, so that the url is somthing like: http://url/controller/action and not http://url/subfolder/controller/action.