alphagov/govuk_component_guide — pull request #2 by dsingleton (2014-08-28 16:37:57+00:00)
Title: Support previewing fixtures with components

https://github.com/alphagov/static/pull/443/ Adds the `metadata` component, which depends on arguments to the partial, without them there's nothing to preview.

Part of the component documentation is fixtures, so use one of those for the preview. As a bonus we can display all the other fixtures, to show the variations of the component :tada:

**Caveats**
- This doesn't cover documenting arguments expected by the partial, that needs some thought.
- Some of the ruby in the templates is a bit shonky, (hello `with_indifferent_access`) but i'm planning to clean that up in a separate PR that wraps some simple models around the component hashes.