moiristo / deep_cloneable

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

Clone to different model #109

Open t56k opened 5 years ago

t56k commented 5 years ago

Does this gem support the option to clone a set of children to a different model?

Say a Template has many Frames, and Frames have many FrameVariables. Can I clone those Frames and FrameVariables to a new Document?

moiristo commented 5 years ago

No, there's no support to do that yet. As the copy is not saved, you could make a copy of the template first and then reattach the duplicated frames to the document afterwards instead.

t2 commented 6 months ago

@t56k how did you go about this? I am working on the same thing. It doesn't seem we would even need this gem if we have to go through setting attributes manually anyways.