Forum: Ruby on Rails Removing the path_prefix from a route

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.
6ef8cb7cd7cd58077f0b57e4fa49a969?d=identicon&s=25 Brian Hogan (Guest)
on 2007-04-11 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?
Bb4bdf2b184027bc38d4fb529770cde5?d=identicon&s=25 Wes Gamble (weyus)
on 2008-08-19 21:04
Brian,

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

Thanks,
Wes
This topic is locked and can not be replied to.