Ask A Question

Notifications

You’re not receiving notifications from this thread.

How to use Multiple Databases in Rails 6.0 Discussion

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!

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.