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:

        /<username>/contacts

That works for that one restful route, but I had hoped to be able to
do something with the nested resource declaration and have this apply
for all the routes... for instance I still have urls that look like
this:

        /users/<user id>/contacts/<contact id>

when I'd like to see:

        /<username>/contacts/<contact id>

anybody know how to get this form for all the generated restful
routes?

On Aug 10, 5:56 pm, bill walton <bwalton...@gmail.com> wrote:
> 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 Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to