3 ms·
We've been doing this for years on a Rails 3 app. We yield from a `slave` method, with the connection pointing to the replica DB until yield returns. It's just
by hirundo 7y ago
We've been doing this for years on a Rails 3 app. We yield from a `slave` method, with the connection pointing to the replica DB until yield returns. It's just a short method. It's great if Rails now supports this directly, but a shame if people have been waiting for it.
- scruple 7y agoDitto, though we started this behavior in Rails 3 or 4, I no longer recall, and are now on 5.2.X.