alphagov/whitehall — pull request #1451 by tekin (2014-05-01 10:22:02+00:00)
Title: Fix related detailed guides relations

Tracker: https://www.pivotaltracker.com/story/show/70347442

The code that was meant to return published related detailed guides was not behaving correctly, as detailed in the story above. This is because the reverse relationship (i.e. give me all the published detailed guides that are related to me) would also return documents that had previously been associated with the document, even if they are no longer associated via the currently published edition.

The penultimate commit attempts to simplify things by using the pre-existing mixin for associating editions with documents, rather than the different-but-the-same associations that were on the `DetailedGuide` model.

The final commit is to handle the param change so that any editors with a detailed guide open for editing can still successfully submit their changes. This final commit can be rolled back once the code is successfully deployed.