ryanb/nested_form — pull request #194 by shingara (2012-09-14 07:40:04+00:00)
Title: Datamapper compatibility

Datamapper is not compatible to nested_form.

To have the `accepts_nested_attributes_for` in Datamapper you need use the gem : `dm-accepts_nested_attributes`.

But if you use it, nested_form is not compatible because 2 problems :

#### 1. reflect_on_association

This method is not design in Datamapper. You need use the `klass.repository[association].target_model` instead.

#### 2. _destroy is not define

In this gem the attribute to mark a record destroy is `_delete` instead of `_destroy` on ActiveRecord. And there are no method `_destroy` or `_delete` in the instance to check if this object can be delete or not in futur.

This pull request help to work DataMapper and nested_form together. But actually, it's not compatible to ActiveRecord anymore. I can do the job to be compatible both. But I prefer start avoid it in first and do the job if needed.