solnic/virtus — pull request #292 by JanDintel (2014-09-03 23:11:16+00:00)
Title: Allow a default value when the attribute is assigned as nil, with the :allow_nil option

This MR adds the option `:allow_nil` to a `Virtus::Attribute`. The option allows the user to specify wether to use the default value of an attribute that got assigned as nil. The option will be `false` by default for backwards compatibility.

See [gist for before and after examples](https://gist.github.com/JanDintel/1ecee5fe4cd251a2997d)

Related issues for this MR are: [#291](https://github.com/solnic/virtus/issues/291) and [#172](https://github.com/solnic/virtus/issues/172).