DmitryTsepelev / store_model

Work with JSON-backed attributes as ActiveRecord-ish models
MIT License
1.04k stars 85 forks source link

Support option "allow_destroy" to accepts_nested_attributes_for #138

Closed mateusnava closed 1 year ago

mateusnava commented 1 year ago

Similar to the accepts_nested_attributes_for active record, the idea here is to support the allow_destroy option in the accepts_nested_attributes_for store_model method.

For example: accepts_nested_attributes_for [:suppliers, allow_destroy: true]

Active Record documentation: https://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html#method-i-accepts_nested_attributes_for