alphagov/govuk_content_api — pull request #9 by jamiecobbett (2012-09-05 22:19:28+00:00)
Title: Make related artefacts consistent with top level

In order to do this, we want to reuse the artefact partial.
Unfortunately, that means that related artefacts have related
artefacts have related artefacts… and we get a "stack level too deep"
error. RABL doesn't allow passing of options, so we can't specify
which variant we want in the top level template.

Therefore, we need two partials: one - "basic" - with most
of the artefact data, and a second one - "full" - that
contains that plus the related artefacts, rendered with
the basic template (and therefore without related artefacts).

To top it all off, we can then reuse the "basic" template in the
"full" template as a base.