Skip to content

Conversation

@lime
Copy link

@lime lime commented Oct 14, 2016

This is a revamp of the feature proposed in #292, though named differently. I tried to avoid confusion by making the name pretty explicit, but I'm open to suggestions if you feel there are better naming options.

When configuring use_default_on_nil: true, an attribute which gets set to nil will fallback to the :default value.

The implementation is heavily based on the :nullify_blank option in #314.

Let me know what you think. :)

lime added 3 commits October 14, 2016 21:24
:use_default_on_nil makes an attribute fallback to the :default value
(if one is set) when attempting to set it to nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant