Topic: URL without ID

Hello, I have this situation. I created entity USER (MVC), every user has its own ID. Then I created CARD (VC without model). And at last I created DOCUMENT (MVC), every document has its own ID.

I have something like this in routes.rb

resources users do
  resources cards, :path => "card", :only => :index do
    resources documents

So I want create by routes this url: user/:user_id/card/document/:document_id
and user/:user_id/card/ where will be all document of current user listed.
But only what I got is this: user/:user_id/card/:card_id/document/:document_id
CARD will be only index page where are documents listed and possibility to create a new document.

Thank you for help

Last edited by tomasg (2012-07-31 01:48:03)