apotonick/roar — pull request #29 by jwkoelewijn (2012-05-30 12:41:21+00:00)
Title: Fixed problem with parsing of JSON:HAL when properties are omitted

It is possible to create embedded properties with a defined class, which
is used for representation and parsing. However, when an embedded, class
configured property is omitted in the input JSON:HAL, an error (
undefined method '[]' for nil:NilClass ) is generated.

This commit provides a spec reproducing this problem and a simple fix
that checks if the property is actually in the provided document and
returns nil if it is not present.