Ruby Forum Ruby on Rails > Removing the path_prefix from a route

Posted by Brian Hogan (Guest)
on 11.04.2007 22:32
(Received via mailing list)
Let's say I have a resource defined...
  map.resources :user do |user|
    user.resource :profile
    user.resource :foo
  end

  I've got everything working so to_param spits out the username instead 
of
the id, so now I have urls like

/user/homer
/user/homer/profile
/user/homer/foo

How would one go about removing the /user/ from the route? Is it 
possible?
Posted by Wes Gamble (weyus)
on 19.08.2008 21:04
Brian,

Did you figure out a way to do this besides using .sub on the generated 
URL?

Thanks,
Wes