All,
Just a heads up that we've finally merged an outstanding PR to the docs that documented
how the existing MediaTypeCollections work. This feature was already in the codebase since 0.9, but it was not explicitly documented in our reference docs.
I believe this is a very important and useful feature when dealing with media_types that have
related collections of other media_types. This rounds up our overall MediaType support so you can work with cases where you want to expose relationships to collections of media_type elements in different ways:
- by embedding the full contents of the collection within an attribute. For example, exposing an array of posts (each fully rendered according to a Post view) in the 'posts' attribute of a Blog.
- by embedding just aggregate information about the collection within an attribute. For example, exposing a hash with elements like 'count', 'last_published_date', in the 'posts' attribute of a Blog.
- by simply providing a link to the collection in the links section. Providing an 'href' attribute (and perhaps other annotations) in the 'posts' attribute inside the 'links' section of a Blog.
Any feedback is welcome! Cheers,
Josep M.