Forum: Ruby on Rails Structuring a rails application

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
400893b0b3b325bf0034c354301ff913?d=identicon&s=25 r3dcaps (Guest)
on 2007-04-30 18:56
(Received via mailing list)
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.
F148ec0cad8ea241b1cfd80e7ec8a7df?d=identicon&s=25 Fredrik (Guest)
on 2007-04-30 20:51
(Received via mailing list)
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

400893b0b3b325bf0034c354301ff913?d=identicon&s=25 r3dcaps (Guest)
on 2007-05-01 12:40
(Received via mailing list)
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:


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
This topic is locked and can not be replied to.