1 year ago

#354659

test-img

Gustavo Borges

Rails/Multitenancy - How to transfer data from one account to another when using Apartment gem?

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?

ruby-on-rails

ruby

multi-tenant

apartment-gem

0 Answers

Your Answer

Accepted video resources