I am using the Apartment gem for multitenancy and this separates the database for each tenant. Now I have a request to make a function to copy objects from one tenant to another. I've come across this answer but I think this would create a performance issue, as there are lots of relationships to be copied as well (I have Courses, which have many Lessons, which have many Attachments and so on). Is there a better way to copy those objects and their relationship without switching back and forth from a tenant?
Asked
Active
Viewed 177 times