Save 36% for Black Friday! Learn more

New Discussion

Notifications

You’re not receiving notifications from this thread.

How to use Multiple Databases in Rails 6.0 Discussion

0
General

Hi. I am trying to use Rails 6's automatic read/write splitting with the multiple databases feature. There seems to be a problem with Devise, because the automatic connection switching sends writes to the master for POST/PUT/DELETE requests and reads to the replicas for GET requests. However Devise makes changes/writes to the database even with GET requests sometimes (for example to confirm a user upon sign up using a token in the link in the confirmation email), so these changes are basically blocked by Rails. Does anyone have any idea for a workaround? I've opened a Github issue about it: https://github.com/plataformatec/devise/issues/5133

Thanks!

Join the discussion
Create an account Log in