[Rails] Re: overriding std nested resources route

2009-08-12 Thread lunaclaire
thx... I had tried named routes, but something must not have been right... now I got it working as follows: map.contacts '/:username/contacts', :controller => 'contacts', :action => 'index' this gives me what I wanted. if I use: contacts_url(@user.username): I get: //c

[Rails] Re: overriding std nested resources route

2009-08-11 Thread heimdull
If you want the route to be www.mysite.com/bill-walton you will have to create a catch-all and ofcourse that needs to go at the bottom of your routes... Something like so: map.username ':username', :controller => 'users', :action => 'show' But now you will have to do a good amount of security i

[Rails] Re: overriding std nested resources route

2009-08-10 Thread bill walton
Hi, On Mon, 2009-08-10 at 17:46 -0700, lunaclaire wrote: > I'm trying to get rid of the '/users' in the front. I believe you need to consider using named routes. HTH, Bill --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: overriding std nested resources route

2009-08-10 Thread lunaclaire
btw - I also tried map.resources :users, :path_prefix => "/:username" but that still leaves the url as: /users//contacts I'm trying to get rid of the '/users' in the front. On Aug 10, 5:31 pm, lunaclaire wrote: > I have a set of nested resources as follows: > >         map.reso