alphagov/govuk_content_models — pull request #93 by Floppy (2013-07-22 15:04:34+00:00)
Title: Make Artefact format validator dynamic

We're creating our own content models gem in theodi/odi_content_models, which builds on govuk_content_models, but adds our own models. This is reasonably straightforward, except for Artefact validation, which doesn't use the altered FORMATS list that we've created. By changing the validator to get the FORMATS array from a lambda, this can be overriden elsewhere and still validated correctly. I don't imagine this would have much of a performance impact.