I need to be able to copy a record. By that I mean that: All the references need to be deep copied.
For example, if I have a Case and it has a patient_id linking to a patient, to copy a case would mean to create a copy of the patient too.
Therefore, what would be a 'best practices' way to do this. My first thought was to make a create_copy method for all my models and each of these calls that for all their dependencies to create a cascading deep copy.
I am just wondering if there is a more 'rails' way to do this where I could add on to the clone function?