Forum: Ruby on Rails Routing requests to a default controller module

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3cffdac8c6712eeec41d2e35abee90b9?d=identicon&s=25 Jonathan Dance (wuputah)
on 2006-04-07 20:03
Howdy,

I've been looking for a way to more finely control which module a
request goes to. Basically, by default, I want all requests to
particular module. If a request happens to match a full
module+controller name, then it can route to that request (i.e. the
default case). So basically something like:

map.connect ':controller/:action/:id', :controller =>
"DefaultModule::#{controller}"

map.connect ':controller/:action/:id'

...except I made up the first line. Is there any way to do this (easily
or otherwise)? I was digging around in action_controller/routing.rb and
I figure I might be able to make a modification to
traverse_to_controller to do this.

JD
This topic is locked and can not be replied to.