Route to a controller outside of a namespace

i have a couple controller namespaces in my app and to keep things
DRY, i would like to use a common controller in some of them.

when i try creating a route, i can not figure out how to
set :controller to use a controller outside of the namespace.

map.namespace :user do |user|
user.resource :something, :controller => “something”
user.resource :something2, :controller => “/something2”
end

{:action=>“show”, :controller=>“user/something”}
{:action=>“show”, :controller=>“user//something2”}

i want
{:action=>“show”, :controller=>“something”}

is there a way to tell rails not to automatically add the “user/” to
the beginning of the controller name?

i guess i could create a blank User::Something controller that
inherits from the Something controller, but it seems silly to have to
create an extra controller.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs