alphagov/govuk_content_models — pull request #79 by JordanHatch (2013-06-17 10:44:53+00:00)
Title: Embed nodes for a simple smart answer inside the edition

This removes the `nodes` string attribute from `SimpleSmartAnswerEdition` and creates a new model called `SimpleSmartAnswerNode`. These are embedded in the edition and represent the questions and outcomes (a `kind` attribute determines the type of node).

Persisting nodes as embedded documents - instead of in a single JSON hash - feels more elegant. As well as the cleaner division, we get validations and nested attributes for free.