jeremyevans/sequel — pull request #455 by r-stu31 (2012-03-24 19:04:51+00:00)
Title: Nested attributes plugin: remove _remove/_delete flags from attributes

HTML forms with checkboxes for removing/deleting of associations also supply 'false' values. This leads to complications - one needs to have a "blank" `_remove`/`_delete` setters or set `Model.strict_param_setting = false`.

Provided fix solves the problem by removing the flags from `attributes` hash. I've made two decisions, which you may want to reconsider:

* the removing is done on a `dup` of the original hash to preserve it
* i've reordered the conditions to remove the flags only if the corresponding settings (`reflection[:nested_attributes][:remove]` resp. `reflection[:nested_attributes][:destroy]`) apply