News for hackers. Stuff that matters.
Re:Rails 6.0 by hirundo on Friday August 16, 2019 @03:01PM (#20718484)
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.
Re:Rails 6.0 by scruple on Saturday August 17, 2019 @01:21AM (#20722257)
Ditto, though we started this behavior in Rails 3 or 4, I no longer recall, and are now on 5.2.X.