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

How to handle multiple parents? #146

Closed apomarinov closed 2 years ago

apomarinov commented 2 years ago

Say I have the following structure:

house
   id
   name

door
   id
   house_id
   color_id
   shape_id

color
   id

shape
   id

I want to clone the house with the doors, but in the door I want to:

How would you go about this? Apologies if this is the wrong place to post this.

apomarinov commented 2 years ago

Seems that using use_dictionary: true solved the issue.