alphagov/static — pull request #19 by bradleywright (2012-08-17 12:21:03+00:00)
Title: Move homepage and wrapper templates to an inheritance-like style

ERB doesn't natively support inheritance, so I've flipped the functionality
on its head and used partials to factor out all the common code between
templates so in general use doctypes etc. are only defined once in a single
place. We use a combination of local variables and content_for/yield to get a
form of inheritance out of the templates.

This makes all error pages and wrapper templates render from the same base,
which allows us to easily change global things.