Hi,
I am trying to solve this problem:
I have these resources:
map.resource :account
map.resources :projects
so my urls to projects looks like this: /projects/:id
But client has changed his mind and now he wants urls like
this: /:account_id/:project_slug
This project_slug (using friendly_url gem) is unique in scope of
account, so I need booth account_id and project_slug to identify
project.
I can use this:
map.resources :accounts do |account|
account.resources :projects
end
to make urls like this: /accounts/:account_id/projects/:project_id
but this is not what I want.
Can someone, please, show me the right way to do this?
With regards
Petr Blaho