Skip to main content
Ask A Question
You’re not receiving notifications from this thread.

Integrating Mailboxer with Apartment

General • Asked by Satchit Shenoy


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.

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 :)

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 29,763+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.