I'm trying to integrate mailboxer with apartment, and am having an issue with migrating the tables. I want the mailing service to be universally applied to the app, but apartment migrates the tables for each schema. This creates multiple mailboxes for each subdomain, which is not the desired effect. There are no models to exclude with mailboxer. Is there a workaround?
Oh this is an interesting one. I believe you'll have those tables in all the tenant schemas because of the way the gem works, but you'll be able to exclude the Mailboxer models so that they operate outside of the tenants like you would do with your User model for example.
Check out this section and see if that helps. I believe you'll want the migrations to run as they have already, then just add all the Mailboxer models to this config. https://github.com/influitive/apartment#excluding-models
Tried that.. Sadly, didn't work. Got an unrecognized constant error. Is there any way that I could run migrations for public domain only when it comes to mailboxer?
Hey Chris... Alright, this did work, using the scope operator - Mailbox::Conversation, etc..Thanks for pushing me to prod further :)
Join 29,763+ developers who get early access to new screencasts, articles, guides, updates, and more.