Re: Structuring a rails application

r3dcaps
2007-05-01T10:39:41Z

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.

On Apr 30, 8:50 pm, Fredrik
<fredrik.thures...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> 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
>
> On Apr 30, 11:55 am, r3dcaps <redc...-hi6Y0CQ0nG0@public.gmane.org>
wrote:
>
> > I try to structure myrailsapplication 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.