deep_cloneable
deep_cloneable copied to clipboard
This gem gives every ActiveRecord::Base object the possibility to do a deep clone that includes user specified associations.
Mongoid works very similar to ActiveRecord. I have an application with relationships between ActiveRecord models and Mongoid models. When an ActiveRecord model (with Mongoid models belonging to it) is cloned,...
When calling `deep_clone` with `include` and referencing a `has_and_belongs_to_many` association - it doesn't actually make new instances of the object(s) like it does for every other association (has_many, etc). Using...
I have a deeply nested datamodel that at some point has a has_many_through relation with additional datastructures beneath it that need to be copied. This would normally happen in the...
Not sure what I am doing wrong. I am using rails 6 and attempting to clone a record and it's attached uploads. Any ideas why this is generating this error?...
Thank you so much for your amazing Gem! Rails 6 added [Action Text](https://edgeguides.rubyonrails.org/action_text_overview.html). How would you recommend cloning models with "has_rich_text" associations?
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...
if association is in "include" option, counter_cache field should be in "except" option, otherwise counter_cache field is multiplied by 2 and doesnt represent actual number of associated records (maybe should...
When cloning models with ActiveStorage attachments, I was encountering errors like this: `Errno::ENOENT (No such file or directory @ rb_file_s_size - /tmp/ActiveStorage` when using code like this: ``` # Rails...
Currently when cloning a record with has_many associations, the order of the value of primary key of the associated records is not preserved. PostgreSQL and sqlite3 don't guarantee the order...
Hello! We use your gem to make copies of organizations within our application. There are many objects tied to an organization, and some things are indirectly circular, so I am...