Closed varg90 closed 5 years ago
Hi! There are also some tests for it, so I'm not sure yet why it shouldn't work. Which version of rails are you using?
Hey! I use deep_cloneable v2.3.2 for my rails (v5.1.4) project
Skipping validations in Rails is a bit of pain if you need to skip them recursive (validate: false
works only for the main record on save
), so I think this option is very useful
Yeah, when I have some time I hope I can create a test that reproduces the issue.
Will be fixed in v3 (now in master)
Hi! I have a huge
include:
statement in my.deep_clone
options and I usevalidate: false
to speed up the cloning process (it takes a days to finish). But when I tried to debug the cloning process, I noticed that it still uses validations. In the gem files it saysI have to manually skip each of my validation before to run
cloned_record.save!
and now it takes just a few seconds to finish. Not sure, whyvalidate: false
was ignored, if I understand it right, it should be used in this part of code