airbrake/airbrake — pull request #334 by dvdplm (2014-09-23 10:26:32+00:00)
Title: Refactor #airbrake_current_user

Fix for https://github.com/airbrake/airbrake/issues/313 based on the (excellent) work by @tonyarkles and his PR https://github.com/airbrake/airbrake/pull/331

- ensure we return the DB connection
- split the DB interaction from populating the hash

The reason I prefer doing it this way is that it isolates the problematic spot into a single short method.