Skip to content

Instantly share code, notes, and snippets.

@incorvia
Created October 10, 2011 14:31
Show Gist options
  • Save incorvia/1275468 to your computer and use it in GitHub Desktop.
Save incorvia/1275468 to your computer and use it in GitHub Desktop.
resources :users do
resources :tags
end
=============================================
this works: tag_name is passed as a paramater {"tag_name"=>"@books"}
==============================================
match '/tags/:tag_name', :to => "tags#show"
=============================================
Here: tag_name is passed as "id": {"user_id"=>"5", "id"=>"@books"}
==============================================
match '/:users/:id/tags/:tag_name', :to => "tags#show"
======
How can I get the second one to pass user id and tag_name?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment