Hi,
Nested Routes often have what seems to be extra information, and I'm not certain why.
I can understand why "GET /projects/1/iterations" needs to have a project id. However, why does "GET /projects/1/iterations/1234" need to have the project id? It seems like "GET /projects/5678/iterations/ 1234" would accomplish exactly the same thing unless the controller explicitly checked for the fact that iteration 1234 doesn't have project 5678 as it's parent.
I assume this is done for resource identification consistency. Because the URL represents a resource, the resource should be consistently named, even though some of the information isn't needed. Is this the case?
But that begs the question: do the two URLs refer to the same resource? Logically it seems they shouldn't. But from my understanding of the internals, it looks like from the controllers perspective they would be: both would refer to iteration 1234. What am I not understanding? Are there automatic consistency checks?
Thanks, Brad