liveh2o/protobuf-activerecord — pull request #11 by liveh2o (2014-01-27 23:43:07+00:00)
Title: Ensure DB connections are checked in

Using PB's around service filters, wrap each request in an AR `with_connection` call so that connections are checked in and out with each RPC request. This will ensure that DB connections are checked in after each RPC request and (hopefully) make PB::AR more compatible with Rails 4 (which no longer ensures connections are checked in for you).

@localshred, is this the best way to hook into the service filters? Alternatively, I can use the `on_inherit` hook to add filters to each service class, but this seems more efficient, assuming it will work as I'm expecting it to.

// @abrandoned