moiristo / deep_cloneable

This gem gives every ActiveRecord::Base object the possibility to do a deep clone that includes user specified associations.
MIT License
786 stars 88 forks source link

Clarification in readme about cloning with a block #40

Closed yourtallness closed 9 years ago

yourtallness commented 10 years ago

The README correctly shows that when using a block, the cloned object should be checked before performing some custom operation, to see if is is_a? certain type or respond_to? a particular method.

However, I learned that this is because the associated objects being cloned are also passed to this block and it would fail with a missing method error if the cloned associated object has no such method.

Could you add a note to the corresponding section so that this comes as less of a surprise?

Thanks in advance.