Topic: REST - how to put 2 ressources in the path
I have this problem, I m trying to create a Restful application, I have 2 different resources : Document and Schema, a document can have one schema and schema can be applied to different documents. The thing is i would like to allow the user to select a schema to use with a document with a rest path looking like this :
but i have no idea how to perfome this. Should i create nested resources in routes.rb ? But i don't think it's a good solution cause i have specific methods to both ressources, for example
documents/1;manage or schemas/2;check
... as you can see i really have no idea how to solve this problem, i just need some hints.
Thanks for your help