alphagov/whitehall — pull request #347 by tekin (2013-03-14 16:24:40+00:00)
Title: Related docs activity for worldwide priorities

This updates the Worldwide Priority page to include tabbed navigation for recent activity. related published editions are listed here.

This story also updates `Policy` such that policies can now be linked with related worldwide priorities. To do this, I had to tweak `Editions::RelatedDocuments` as the `edition_relation` association` clashed with one of the same name in the `Policy` model.

**Aside** There is some wider refactoring that should be done around these associations, as `edition_relation` is ambiguous and has been used to mean two different things in different models: 1. finding editions via the documents that an edition is associated with, and 2. the inverse; finding editions that have associated themselves with the edition's document. `DetailedGuide` uses the terminology of `inbound_edition_relation` and `outbound_edition_relation` to differentiate the two. The suggestion is that we have two separate mixins to represent the two directions, e.g. `Editions::OutboundRelatedDocuments` and `Editions::InboundRelatedDocuments` and these are used to replace the various associations across the different edition types.