Re: Hatred towards Nested Polymorphic Paths

psadauskas@gmail.com
2007-07-07T18:17:50Z

I''m working on a project now, where we have things like:

/album/1/tracks
/tracks                 #=> not valid
/tracks/1              #=> valid
/tracks/1/artists    #=> Assume a track has many artists
/artists/1/tracks    #=> reverse of above; all the tracks for an
artist.

Basically, we want `/foo/x/bar` to be valid, but not `/foo/x/bar/y`.
And we want `/bar/y` to be valid, but not `/bar`. We''re finishing up a
plugin that defines those partial routes: index and create as nested
resources, and show, edit and delete as non-nested.