I have 2 models that I would like to setup routes for: Apps and Issues
Apps have many issues and each issue belongs to an App.
I want the URL to represent the fact that issues never come without its app. So something like this:
website.com/app-name/issues/2
But i’m not sure how to set that up properly in the routes. I also validate the uniqueness of app names, so I won’t have any overlap issue.
You’d like to use rails nested resources: http://guides.rubyonrails.org/routing.html#nested-resources
Basically:
More info on customizing your route to cater to the app name here:
Routing nested resources in Rails 3