ar_doc_store
ar_doc_store copied to clipboard
`multiple: true` attributes do not default to `[]`
When having an attribute like
json_attribute colors, :string, multiple: true
then this field will still default to nil, instead of to an empty array ([]).
This goes against the principle of least astonishment, so I suggest to change this.
And if you disagree and believe that nil is a good default value even for arrays, then in that case it at least makes sense to improve the documentation on that matter :slightly_smiling_face: .
And let me know if I can help with e.g. making a PR for this; I'll happily do so!
Sorry for the delay! Thank you for noticing the issue. Empty array sounds good. PR accepted happily!