Duplicating models with complex nested associations

I was recently working on an app that required duplicating an Active Record model and its associations. But the complex structure of these.This is the model I needed to duplicate (a simplified version of it). I started off by installing the popular deep_cloneable gem and assumed it would be up to the task. However, I quickly ran into an issue. The circular and nested associations were not cloned properly. This was my first attempt at duplicating the associations:.
Duplicating models with complex nested associations #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/duplicating-models-with-complex-nested-associations

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles